mirror of
https://github.com/3b1b/manim.git
synced 2025-09-01 00:48:45 +00:00
Resolve undefined names
This commit is contained in:
parent
994749cead
commit
a9c1498aff
2 changed files with 12 additions and 10 deletions
|
@ -29,6 +29,12 @@ IMAGE_MAP_DATA_FILE = os.path.join(NN_DIRECTORY, "image_map")
|
||||||
# DEFAULT_LAYER_SIZES = [28**2, 80, 10]
|
# DEFAULT_LAYER_SIZES = [28**2, 80, 10]
|
||||||
DEFAULT_LAYER_SIZES = [28**2, 16, 16, 10]
|
DEFAULT_LAYER_SIZES = [28**2, 16, 16, 10]
|
||||||
|
|
||||||
|
try:
|
||||||
|
xrange # Python 2
|
||||||
|
except NameError:
|
||||||
|
xrange = range # Python 3
|
||||||
|
|
||||||
|
|
||||||
class Network(object):
|
class Network(object):
|
||||||
def __init__(self, sizes, non_linearity = "sigmoid"):
|
def __init__(self, sizes, non_linearity = "sigmoid"):
|
||||||
"""The list ``sizes`` contains the number of neurons in the
|
"""The list ``sizes`` contains the number of neurons in the
|
||||||
|
|
|
@ -1,6 +1,10 @@
|
||||||
import numpy as np
|
import numpy as np
|
||||||
from animation.transform import Transform
|
from animation.transform import ApplyMethod, Transform
|
||||||
|
from constants import RIGHT, SPACE_WIDTH, UP
|
||||||
|
from helpers import counterclockwise_path, straight_path
|
||||||
from point_cloud_mobject import Point
|
from point_cloud_mobject import Point
|
||||||
|
from scene import Scene
|
||||||
|
from topics.geometry import Line
|
||||||
from topics.number_line import NumberLine
|
from topics.number_line import NumberLine
|
||||||
|
|
||||||
class NumberLineScene(Scene):
|
class NumberLineScene(Scene):
|
||||||
|
@ -23,7 +27,7 @@ class NumberLineScene(Scene):
|
||||||
number_at_center = number
|
number_at_center = number
|
||||||
)
|
)
|
||||||
new_displayed_numbers = new_number_line.default_numbers_to_display()
|
new_displayed_numbers = new_number_line.default_numbers_to_display()
|
||||||
new_number_mobs = new_number_line.get_number_mobjects(*new_displayed_numbers)
|
new_number_mobs = new_number_line.get_number_mobjects(*new_displayed_numbers)
|
||||||
|
|
||||||
transforms = []
|
transforms = []
|
||||||
additional_mobjects = []
|
additional_mobjects = []
|
||||||
|
@ -78,11 +82,3 @@ class NumberLineScene(Scene):
|
||||||
ApplyMethod(mob.shift, (num-1)*mob.get_center()[0]*RIGHT, **kwargs)
|
ApplyMethod(mob.shift, (num-1)*mob.get_center()[0]*RIGHT, **kwargs)
|
||||||
for mob in self.number_mobs
|
for mob in self.number_mobs
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue