Resolve undefined names

This commit is contained in:
cclauss
2018-01-29 10:25:43 +01:00
parent 994749cead
commit a9c1498aff
2 changed files with 12 additions and 10 deletions

View File

@ -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, 16, 16, 10]
try:
xrange # Python 2
except NameError:
xrange = range # Python 3
class Network(object):
def __init__(self, sizes, non_linearity = "sigmoid"):
"""The list ``sizes`` contains the number of neurons in the