mirror of
https://github.com/3b1b/manim.git
synced 2025-08-05 16:49:03 +00:00
nn progress up to introduction of weights and biases
This commit is contained in:
parent
45ac45e259
commit
2d20084573
4 changed files with 1016 additions and 18 deletions
|
@ -110,6 +110,10 @@ class GrowFromCenter(GrowFromPoint):
|
|||
def __init__(self, mobject, **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):
|
||||
CONFIG = {
|
||||
"path_func" : counterclockwise_path()
|
||||
|
|
|
@ -100,12 +100,15 @@ class Mobject(object):
|
|||
)
|
||||
|
||||
def copy(self):
|
||||
copy_mobject = copy.copy(self)
|
||||
copy_mobject.points = np.array(self.points)
|
||||
copy_mobject.submobjects = [
|
||||
submob.copy() for submob in self.submobjects
|
||||
]
|
||||
return copy_mobject
|
||||
#TODO, either justify reason for shallow copy, or
|
||||
#remove this redundancy everywhere
|
||||
return self.deepcopy()
|
||||
# copy_mobject = copy.copy(self)
|
||||
# copy_mobject.points = np.array(self.points)
|
||||
# copy_mobject.submobjects = [
|
||||
# submob.copy() for submob in self.submobjects
|
||||
# ]
|
||||
# return copy_mobject
|
||||
|
||||
def deepcopy(self):
|
||||
return copy.deepcopy(self)
|
||||
|
|
1013
nn/scenes.py
1013
nn/scenes.py
File diff suppressed because it is too large
Load diff
|
@ -19,7 +19,7 @@ class NumberLine(VMobject):
|
|||
"numbers_to_show" : None,
|
||||
"longer_tick_multiple" : 2,
|
||||
"number_at_center" : 0,
|
||||
"number_scale_val" : 0.5,
|
||||
"number_scale_val" : 0.75,
|
||||
"line_to_number_vect" : DOWN,
|
||||
"line_to_number_buff" : MED_SMALL_BUFF,
|
||||
"include_tip" : False,
|
||||
|
|
Loading…
Add table
Reference in a new issue