nn progress up to introduction of weights and biases

This commit is contained in:
Grant Sanderson 2017-09-28 21:48:28 -07:00
parent 45ac45e259
commit 2d20084573
4 changed files with 1016 additions and 18 deletions

View file

@ -110,6 +110,10 @@ class GrowFromCenter(GrowFromPoint):
def __init__(self, mobject, **kwargs): def __init__(self, mobject, **kwargs):
GrowFromPoint.__init__(self, mobject, mobject.get_center(), **kwargs) GrowFromPoint.__init__(self, mobject, mobject.get_center(), **kwargs)
class GrowArrow(GrowFromPoint):
def __init__(self, arrow, **kwargs):
GrowFromPoint.__init__(self, arrow, arrow.get_start(), **kwargs)
class SpinInFromNothing(GrowFromCenter): class SpinInFromNothing(GrowFromCenter):
CONFIG = { CONFIG = {
"path_func" : counterclockwise_path() "path_func" : counterclockwise_path()

View file

@ -100,12 +100,15 @@ class Mobject(object):
) )
def copy(self): def copy(self):
copy_mobject = copy.copy(self) #TODO, either justify reason for shallow copy, or
copy_mobject.points = np.array(self.points) #remove this redundancy everywhere
copy_mobject.submobjects = [ return self.deepcopy()
submob.copy() for submob in self.submobjects # copy_mobject = copy.copy(self)
] # copy_mobject.points = np.array(self.points)
return copy_mobject # copy_mobject.submobjects = [
# submob.copy() for submob in self.submobjects
# ]
# return copy_mobject
def deepcopy(self): def deepcopy(self):
return copy.deepcopy(self) return copy.deepcopy(self)

File diff suppressed because it is too large Load diff

View file

@ -19,7 +19,7 @@ class NumberLine(VMobject):
"numbers_to_show" : None, "numbers_to_show" : None,
"longer_tick_multiple" : 2, "longer_tick_multiple" : 2,
"number_at_center" : 0, "number_at_center" : 0,
"number_scale_val" : 0.5, "number_scale_val" : 0.75,
"line_to_number_vect" : DOWN, "line_to_number_vect" : DOWN,
"line_to_number_buff" : MED_SMALL_BUFF, "line_to_number_buff" : MED_SMALL_BUFF,
"include_tip" : False, "include_tip" : False,