This document is used as a notebook while following a course on TensorFlow.

Prerequisite

# Note: this is a required dependency. Run that first before any other python code cell bellow.
# Don't panic: messages saying "Failed building wheel for $module_name" don't mean the installation failed.
!pip install tensorflow
Collecting tensorflow
  Using cached https://files.pythonhosted.org/packages/77/63/a9fa76de8dffe7455304c4ed635be4aa9c0bacef6e0633d87d5f54530c5c/tensorflow-1.13.1-cp36-cp36m-manylinux1_x86_64.whl
Collecting tensorboard<1.14.0,>=1.13.0 (from tensorflow)
  Using cached https://files.pythonhosted.org/packages/0f/39/bdd75b08a6fba41f098b6cb091b9e8c7a80e1b4d679a581a0ccd17b10373/tensorboard-1.13.1-py3-none-any.whl
Collecting termcolor>=1.1.0 (from tensorflow)
  Using cached https://files.pythonhosted.org/packages/8a/48/a76be51647d0eb9f10e2a4511bf3ffb8cc1e6b14e9e4fab46173aa79f981/termcolor-1.1.0.tar.gz
Collecting wheel>=0.26 (from tensorflow)
  Using cached https://files.pythonhosted.org/packages/96/ba/a4702cbb6a3a485239fbe9525443446203f00771af9ac000fa3ef2788201/wheel-0.33.1-py2.py3-none-any.whl
Collecting protobuf>=3.6.1 (from tensorflow)
  Using cached https://files.pythonhosted.org/packages/5a/aa/a858df367b464f5e9452e1c538aa47754d467023850c00b000287750fa77/protobuf-3.7.1-cp36-cp36m-manylinux1_x86_64.whl
Collecting keras-applications>=1.0.6 (from tensorflow)
  Using cached https://files.pythonhosted.org/packages/90/85/64c82949765cfb246bbdaf5aca2d55f400f792655927a017710a78445def/Keras_Applications-1.0.7-py2.py3-none-any.whl
Requirement already satisfied: numpy>=1.13.3 in /srv/paws/lib/python3.6/site-packages (from tensorflow)
Collecting tensorflow-estimator<1.14.0rc0,>=1.13.0 (from tensorflow)
  Using cached https://files.pythonhosted.org/packages/bb/48/13f49fc3fa0fdf916aa1419013bb8f2ad09674c275b4046d5ee669a46873/tensorflow_estimator-1.13.0-py2.py3-none-any.whl
Collecting gast>=0.2.0 (from tensorflow)
  Using cached https://files.pythonhosted.org/packages/4e/35/11749bf99b2d4e3cceb4d55ca22590b0d7c2c62b9de38ac4a4a7f4687421/gast-0.2.2.tar.gz
Collecting astor>=0.6.0 (from tensorflow)
  Using cached https://files.pythonhosted.org/packages/35/6b/11530768cac581a12952a2aad00e1526b89d242d0b9f59534ef6e6a1752f/astor-0.7.1-py2.py3-none-any.whl
Collecting absl-py>=0.1.6 (from tensorflow)
  Using cached https://files.pythonhosted.org/packages/da/3f/9b0355080b81b15ba6a9ffcf1f5ea39e307a2778b2f2dc8694724e8abd5b/absl-py-0.7.1.tar.gz
Collecting grpcio>=1.8.6 (from tensorflow)
  Downloading https://files.pythonhosted.org/packages/0a/9d/8bd5d0e516b196f59f1c4439b424b8d4fa62d492a4b531aae322d2d82a7b/grpcio-1.20.1-cp36-cp36m-manylinux1_x86_64.whl (2.1MB)
    100% |████████████████████████████████| 2.2MB 122kB/s eta 0:00:01
Requirement already satisfied: six>=1.10.0 in /srv/paws/lib/python3.6/site-packages (from tensorflow)
Collecting keras-preprocessing>=1.0.5 (from tensorflow)
  Using cached https://files.pythonhosted.org/packages/c0/bf/0315ef6a9fd3fc2346e85b0ff1f5f83ca17073f2c31ac719ab2e4da0d4a3/Keras_Preprocessing-1.0.9-py2.py3-none-any.whl
Collecting markdown>=2.6.8 (from tensorboard<1.14.0,>=1.13.0->tensorflow)
  Using cached https://files.pythonhosted.org/packages/f5/e4/d8c18f2555add57ff21bf25af36d827145896a07607486cc79a2aea641af/Markdown-3.1-py2.py3-none-any.whl
Requirement already satisfied: werkzeug>=0.11.15 in /srv/paws/lib/python3.6/site-packages (from tensorboard<1.14.0,>=1.13.0->tensorflow)
Requirement already satisfied: setuptools in /srv/paws/lib/python3.6/site-packages (from protobuf>=3.6.1->tensorflow)
Collecting h5py (from keras-applications>=1.0.6->tensorflow)
  Using cached https://files.pythonhosted.org/packages/30/99/d7d4fbf2d02bb30fb76179911a250074b55b852d34e98dd452a9f394ac06/h5py-2.9.0-cp36-cp36m-manylinux1_x86_64.whl
Collecting mock>=2.0.0 (from tensorflow-estimator<1.14.0rc0,>=1.13.0->tensorflow)
  Using cached https://files.pythonhosted.org/packages/e6/35/f187bdf23be87092bd0f1200d43d23076cee4d0dec109f195173fd3ebc79/mock-2.0.0-py2.py3-none-any.whl
Collecting pbr>=0.11 (from mock>=2.0.0->tensorflow-estimator<1.14.0rc0,>=1.13.0->tensorflow)
  Downloading https://files.pythonhosted.org/packages/07/3e/22d1d35a4b51706ca3590c54359aeb5fa7ea60df46180143a3ea13d45f29/pbr-5.2.0-py2.py3-none-any.whl (107kB)
    100% |████████████████████████████████| 112kB 1.3MB/s eta 0:00:01
Building wheels for collected packages: termcolor, gast, absl-py
  Running setup.py bdist_wheel for termcolor ... error
  Complete output from command /srv/paws/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-nr0mamtk/termcolor/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/tmp3s149fzcpip-wheel- --python-tag cp36:
  usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
     or: -c --help [cmd1 cmd2 ...]
     or: -c --help-commands
     or: -c cmd --help
  
  error: invalid command 'bdist_wheel'
  
  ----------------------------------------
  Failed building wheel for termcolor
  Running setup.py clean for termcolor
  Running setup.py bdist_wheel for gast ... error
  Complete output from command /srv/paws/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-nr0mamtk/gast/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/tmpb165aa9ipip-wheel- --python-tag cp36:
  usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
     or: -c --help [cmd1 cmd2 ...]
     or: -c --help-commands
     or: -c cmd --help
  
  error: invalid command 'bdist_wheel'
  
  ----------------------------------------
  Failed building wheel for gast
  Running setup.py clean for gast
  Running setup.py bdist_wheel for absl-py ... error
  Complete output from command /srv/paws/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-nr0mamtk/absl-py/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/tmp03lgpartpip-wheel- --python-tag cp36:
  /usr/lib/python3.6/distutils/dist.py:261: UserWarning: Unknown distribution option: 'long_description_content_type'
    warnings.warn(msg)
  usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
     or: -c --help [cmd1 cmd2 ...]
     or: -c --help-commands
     or: -c cmd --help
  
  error: invalid command 'bdist_wheel'
  
  ----------------------------------------
  Failed building wheel for absl-py
  Running setup.py clean for absl-py
Failed to build termcolor gast absl-py
Installing collected packages: absl-py, markdown, wheel, protobuf, grpcio, tensorboard, termcolor, h5py, keras-applications, pbr, mock, tensorflow-estimator, gast, astor, keras-preprocessing, tensorflow
  Running setup.py install for absl-py ... done
  Running setup.py install for termcolor ... done
  Running setup.py install for gast ... done
Successfully installed absl-py-0.7.1 astor-0.7.1 gast-0.2.2 grpcio-1.20.1 h5py-2.9.0 keras-applications-1.0.7 keras-preprocessing-1.0.9 markdown-3.1 mock-2.0.0 pbr-5.2.0 protobuf-3.7.1 tensorboard-1.13.1 tensorflow-1.13.1 tensorflow-estimator-1.13.0 termcolor-1.1.0 wheel-0.33.1

Notes related to Week 1

# This is a little rearrangement of the basic "Hello World" given in Course 1 - Part 2 - Lesson 2
import tensorflow as tf
import numpy as np
from tensorflow import keras

# Define and Compile the Neural Network
model = tf.keras.Sequential([keras.layers.Dense(units=1, input_shape=[1])])
model.compile(optimizer='sgd', loss='mean_squared_error')

def relation(number):
    return (number*2) - 1

# Building the data sets
seed = [float(number) for number in range(-1, 5)]
pair = [relation(number) for number in seed]
protomer = np.array(seed, dtype=float)
deutomer = np.array(pair, dtype=float)

# Provide the data and train the neural network¶
model.fit(protomer, deutomer, epochs=500)

# Test the result of the training
target = 10.0
print(model.predict([target]))
print(f"(compare with the expected {relation(target)})")
WARNING:tensorflow:From /srv/paws/lib/python3.6/site-packages/tensorflow/python/ops/resource_variable_ops.py:435: colocate_with (from tensorflow.python.framework.ops) is deprecated and will be removed in a future version.
Instructions for updating:
Colocations handled automatically by placer.
WARNING:tensorflow:From /srv/paws/lib/python3.6/site-packages/tensorflow/python/keras/utils/losses_utils.py:170: to_float (from tensorflow.python.ops.math_ops) is deprecated and will be removed in a future version.
Instructions for updating:
Use tf.cast instead.
WARNING:tensorflow:From /srv/paws/lib/python3.6/site-packages/tensorflow/python/ops/math_ops.py:3066: to_int32 (from tensorflow.python.ops.math_ops) is deprecated and will be removed in a future version.
Instructions for updating:
Use tf.cast instead.
Epoch 1/500
6/6 [==============================] - 0s 16ms/sample - loss: 6.5664
Epoch 2/500
6/6 [==============================] - 0s 265us/sample - loss: 5.3533
Epoch 3/500
6/6 [==============================] - 0s 714us/sample - loss: 4.3950
Epoch 4/500
6/6 [==============================] - 0s 256us/sample - loss: 3.6373
Epoch 5/500
6/6 [==============================] - 0s 166us/sample - loss: 3.0375
Epoch 6/500
6/6 [==============================] - 0s 180us/sample - loss: 2.5620
Epoch 7/500
6/6 [==============================] - 0s 248us/sample - loss: 2.1844
Epoch 8/500
6/6 [==============================] - 0s 420us/sample - loss: 1.8838
Epoch 9/500
6/6 [==============================] - 0s 411us/sample - loss: 1.6440
Epoch 10/500
6/6 [==============================] - 0s 164us/sample - loss: 1.4519
Epoch 11/500
6/6 [==============================] - 0s 398us/sample - loss: 1.2976
Epoch 12/500
6/6 [==============================] - 0s 468us/sample - loss: 1.1729
Epoch 13/500
6/6 [==============================] - 0s 215us/sample - loss: 1.0718
Epoch 14/500
6/6 [==============================] - 0s 184us/sample - loss: 0.9891
Epoch 15/500
6/6 [==============================] - 0s 197us/sample - loss: 0.9211
Epoch 16/500
6/6 [==============================] - 0s 178us/sample - loss: 0.8646
Epoch 17/500
6/6 [==============================] - 0s 232us/sample - loss: 0.8173
Epoch 18/500
6/6 [==============================] - 0s 190us/sample - loss: 0.7773
Epoch 19/500
6/6 [==============================] - 0s 202us/sample - loss: 0.7431
Epoch 20/500
6/6 [==============================] - 0s 180us/sample - loss: 0.7134
Epoch 21/500
6/6 [==============================] - 0s 160us/sample - loss: 0.6875
Epoch 22/500
6/6 [==============================] - 0s 151us/sample - loss: 0.6644
Epoch 23/500
6/6 [==============================] - 0s 182us/sample - loss: 0.6438
Epoch 24/500
6/6 [==============================] - 0s 263us/sample - loss: 0.6251
Epoch 25/500
6/6 [==============================] - 0s 200us/sample - loss: 0.6079
Epoch 26/500
6/6 [==============================] - 0s 219us/sample - loss: 0.5920
Epoch 27/500
6/6 [==============================] - 0s 154us/sample - loss: 0.5771
Epoch 28/500
6/6 [==============================] - 0s 396us/sample - loss: 0.5632
Epoch 29/500
6/6 [==============================] - 0s 376us/sample - loss: 0.5500
Epoch 30/500
6/6 [==============================] - 0s 456us/sample - loss: 0.5373
Epoch 31/500
6/6 [==============================] - 0s 354us/sample - loss: 0.5253
Epoch 32/500
6/6 [==============================] - 0s 469us/sample - loss: 0.5137
Epoch 33/500
6/6 [==============================] - 0s 303us/sample - loss: 0.5025
Epoch 34/500
6/6 [==============================] - 0s 191us/sample - loss: 0.4917
Epoch 35/500
6/6 [==============================] - 0s 188us/sample - loss: 0.4812
Epoch 36/500
6/6 [==============================] - 0s 217us/sample - loss: 0.4710
Epoch 37/500
6/6 [==============================] - 0s 221us/sample - loss: 0.4611
Epoch 38/500
6/6 [==============================] - 0s 248us/sample - loss: 0.4514
Epoch 39/500
6/6 [==============================] - 0s 156us/sample - loss: 0.4420
Epoch 40/500
6/6 [==============================] - 0s 162us/sample - loss: 0.4328
Epoch 41/500
6/6 [==============================] - 0s 163us/sample - loss: 0.4238
Epoch 42/500
6/6 [==============================] - 0s 238us/sample - loss: 0.4150
Epoch 43/500
6/6 [==============================] - 0s 164us/sample - loss: 0.4064
Epoch 44/500
6/6 [==============================] - 0s 145us/sample - loss: 0.3980
Epoch 45/500
6/6 [==============================] - 0s 172us/sample - loss: 0.3898
Epoch 46/500
6/6 [==============================] - 0s 163us/sample - loss: 0.3818
Epoch 47/500
6/6 [==============================] - 0s 164us/sample - loss: 0.3739
Epoch 48/500
6/6 [==============================] - 0s 172us/sample - loss: 0.3662
Epoch 49/500
6/6 [==============================] - 0s 133us/sample - loss: 0.3587
Epoch 50/500
6/6 [==============================] - 0s 153us/sample - loss: 0.3513
Epoch 51/500
6/6 [==============================] - 0s 166us/sample - loss: 0.3441
Epoch 52/500
6/6 [==============================] - 0s 161us/sample - loss: 0.3370
Epoch 53/500
6/6 [==============================] - 0s 189us/sample - loss: 0.3301
Epoch 54/500
6/6 [==============================] - 0s 184us/sample - loss: 0.3233
Epoch 55/500
6/6 [==============================] - 0s 211us/sample - loss: 0.3167
Epoch 56/500
6/6 [==============================] - 0s 152us/sample - loss: 0.3102
Epoch 57/500
6/6 [==============================] - 0s 173us/sample - loss: 0.3038
Epoch 58/500
6/6 [==============================] - 0s 163us/sample - loss: 0.2975
Epoch 59/500
6/6 [==============================] - 0s 157us/sample - loss: 0.2914
Epoch 60/500
6/6 [==============================] - 0s 157us/sample - loss: 0.2854
Epoch 61/500
6/6 [==============================] - 0s 130us/sample - loss: 0.2796
Epoch 62/500
6/6 [==============================] - 0s 170us/sample - loss: 0.2738
Epoch 63/500
6/6 [==============================] - 0s 161us/sample - loss: 0.2682
Epoch 64/500
6/6 [==============================] - 0s 139us/sample - loss: 0.2627
Epoch 65/500
6/6 [==============================] - 0s 218us/sample - loss: 0.2573
Epoch 66/500
6/6 [==============================] - 0s 132us/sample - loss: 0.2520
Epoch 67/500
6/6 [==============================] - 0s 154us/sample - loss: 0.2468
Epoch 68/500
6/6 [==============================] - 0s 186us/sample - loss: 0.2418
Epoch 69/500
6/6 [==============================] - 0s 208us/sample - loss: 0.2368
Epoch 70/500
6/6 [==============================] - 0s 177us/sample - loss: 0.2319
Epoch 71/500
6/6 [==============================] - 0s 146us/sample - loss: 0.2272
Epoch 72/500
6/6 [==============================] - 0s 182us/sample - loss: 0.2225
Epoch 73/500
6/6 [==============================] - 0s 158us/sample - loss: 0.2179
Epoch 74/500
6/6 [==============================] - 0s 144us/sample - loss: 0.2135
Epoch 75/500
6/6 [==============================] - 0s 136us/sample - loss: 0.2091
Epoch 76/500
6/6 [==============================] - 0s 175us/sample - loss: 0.2048
Epoch 77/500
6/6 [==============================] - 0s 146us/sample - loss: 0.2006
Epoch 78/500
6/6 [==============================] - 0s 120us/sample - loss: 0.1965
Epoch 79/500
6/6 [==============================] - 0s 150us/sample - loss: 0.1924
Epoch 80/500
6/6 [==============================] - 0s 484us/sample - loss: 0.1885
Epoch 81/500
6/6 [==============================] - 0s 298us/sample - loss: 0.1846
Epoch 82/500
6/6 [==============================] - 0s 451us/sample - loss: 0.1808
Epoch 83/500
6/6 [==============================] - 0s 299us/sample - loss: 0.1771
Epoch 84/500
6/6 [==============================] - 0s 338us/sample - loss: 0.1735
Epoch 85/500
6/6 [==============================] - 0s 208us/sample - loss: 0.1699
Epoch 86/500
6/6 [==============================] - 0s 181us/sample - loss: 0.1664
Epoch 87/500
6/6 [==============================] - 0s 141us/sample - loss: 0.1630
Epoch 88/500
6/6 [==============================] - 0s 463us/sample - loss: 0.1596
Epoch 89/500
6/6 [==============================] - 0s 177us/sample - loss: 0.1564
Epoch 90/500
6/6 [==============================] - 0s 184us/sample - loss: 0.1531
Epoch 91/500
6/6 [==============================] - 0s 193us/sample - loss: 0.1500
Epoch 92/500
6/6 [==============================] - 0s 162us/sample - loss: 0.1469
Epoch 93/500
6/6 [==============================] - 0s 168us/sample - loss: 0.1439
Epoch 94/500
6/6 [==============================] - 0s 179us/sample - loss: 0.1409
Epoch 95/500
6/6 [==============================] - 0s 170us/sample - loss: 0.1381
Epoch 96/500
6/6 [==============================] - 0s 985us/sample - loss: 0.1352
Epoch 97/500
6/6 [==============================] - 0s 206us/sample - loss: 0.1324
Epoch 98/500
6/6 [==============================] - 0s 193us/sample - loss: 0.1297
Epoch 99/500
6/6 [==============================] - 0s 264us/sample - loss: 0.1271
Epoch 100/500
6/6 [==============================] - 0s 178us/sample - loss: 0.1244
Epoch 101/500
6/6 [==============================] - 0s 177us/sample - loss: 0.1219
Epoch 102/500
6/6 [==============================] - 0s 209us/sample - loss: 0.1194
Epoch 103/500
6/6 [==============================] - 0s 190us/sample - loss: 0.1169
Epoch 104/500
6/6 [==============================] - 0s 181us/sample - loss: 0.1145
Epoch 105/500
6/6 [==============================] - 0s 202us/sample - loss: 0.1122
Epoch 106/500
6/6 [==============================] - 0s 142us/sample - loss: 0.1099
Epoch 107/500
6/6 [==============================] - 0s 163us/sample - loss: 0.1076
Epoch 108/500
6/6 [==============================] - 0s 188us/sample - loss: 0.1054
Epoch 109/500
6/6 [==============================] - 0s 185us/sample - loss: 0.1032
Epoch 110/500
6/6 [==============================] - 0s 159us/sample - loss: 0.1011
Epoch 111/500
6/6 [==============================] - 0s 153us/sample - loss: 0.0990
Epoch 112/500
6/6 [==============================] - 0s 185us/sample - loss: 0.0970
Epoch 113/500
6/6 [==============================] - 0s 238us/sample - loss: 0.0950
Epoch 114/500
6/6 [==============================] - 0s 170us/sample - loss: 0.0931
Epoch 115/500
6/6 [==============================] - 0s 165us/sample - loss: 0.0912
Epoch 116/500
6/6 [==============================] - 0s 157us/sample - loss: 0.0893
Epoch 117/500
6/6 [==============================] - 0s 174us/sample - loss: 0.0874
Epoch 118/500
6/6 [==============================] - 0s 183us/sample - loss: 0.0857
Epoch 119/500
6/6 [==============================] - 0s 150us/sample - loss: 0.0839
Epoch 120/500
6/6 [==============================] - 0s 195us/sample - loss: 0.0822
Epoch 121/500
6/6 [==============================] - 0s 231us/sample - loss: 0.0805
Epoch 122/500
6/6 [==============================] - 0s 141us/sample - loss: 0.0788
Epoch 123/500
6/6 [==============================] - 0s 193us/sample - loss: 0.0772
Epoch 124/500
6/6 [==============================] - 0s 239us/sample - loss: 0.0756
Epoch 125/500
6/6 [==============================] - 0s 194us/sample - loss: 0.0741
Epoch 126/500
6/6 [==============================] - 0s 219us/sample - loss: 0.0725
Epoch 127/500
6/6 [==============================] - 0s 187us/sample - loss: 0.0711
Epoch 128/500
6/6 [==============================] - 0s 222us/sample - loss: 0.0696
Epoch 129/500
6/6 [==============================] - 0s 164us/sample - loss: 0.0682
Epoch 130/500
6/6 [==============================] - 0s 201us/sample - loss: 0.0668
Epoch 131/500
6/6 [==============================] - 0s 280us/sample - loss: 0.0654
Epoch 132/500
6/6 [==============================] - 0s 229us/sample - loss: 0.0641
Epoch 133/500
6/6 [==============================] - 0s 328us/sample - loss: 0.0627
Epoch 134/500
6/6 [==============================] - 0s 148us/sample - loss: 0.0614
Epoch 135/500
6/6 [==============================] - 0s 159us/sample - loss: 0.0602
Epoch 136/500
6/6 [==============================] - 0s 180us/sample - loss: 0.0590
Epoch 137/500
6/6 [==============================] - 0s 214us/sample - loss: 0.0577
Epoch 138/500
6/6 [==============================] - 0s 185us/sample - loss: 0.0566
Epoch 139/500
6/6 [==============================] - 0s 226us/sample - loss: 0.0554
Epoch 140/500
6/6 [==============================] - 0s 144us/sample - loss: 0.0543
Epoch 141/500
6/6 [==============================] - 0s 198us/sample - loss: 0.0531
Epoch 142/500
6/6 [==============================] - 0s 137us/sample - loss: 0.0520
Epoch 143/500
6/6 [==============================] - 0s 143us/sample - loss: 0.0510
Epoch 144/500
6/6 [==============================] - 0s 122us/sample - loss: 0.0499
Epoch 145/500
6/6 [==============================] - 0s 134us/sample - loss: 0.0489
Epoch 146/500
6/6 [==============================] - 0s 124us/sample - loss: 0.0479
Epoch 147/500
6/6 [==============================] - 0s 117us/sample - loss: 0.0469
Epoch 148/500
6/6 [==============================] - 0s 119us/sample - loss: 0.0460
Epoch 149/500
6/6 [==============================] - 0s 153us/sample - loss: 0.0450
Epoch 150/500
6/6 [==============================] - 0s 128us/sample - loss: 0.0441
Epoch 151/500
6/6 [==============================] - 0s 132us/sample - loss: 0.0432
Epoch 152/500
6/6 [==============================] - 0s 121us/sample - loss: 0.0423
Epoch 153/500
6/6 [==============================] - 0s 159us/sample - loss: 0.0414
Epoch 154/500
6/6 [==============================] - 0s 112us/sample - loss: 0.0406
Epoch 155/500
6/6 [==============================] - 0s 166us/sample - loss: 0.0397
Epoch 156/500
6/6 [==============================] - 0s 129us/sample - loss: 0.0389
Epoch 157/500
6/6 [==============================] - 0s 131us/sample - loss: 0.0381
Epoch 158/500
6/6 [==============================] - 0s 125us/sample - loss: 0.0373
Epoch 159/500
6/6 [==============================] - 0s 130us/sample - loss: 0.0366
Epoch 160/500
6/6 [==============================] - 0s 174us/sample - loss: 0.0358
Epoch 161/500
6/6 [==============================] - 0s 173us/sample - loss: 0.0351
Epoch 162/500
6/6 [==============================] - 0s 122us/sample - loss: 0.0344
Epoch 163/500
6/6 [==============================] - 0s 125us/sample - loss: 0.0337
Epoch 164/500
6/6 [==============================] - 0s 121us/sample - loss: 0.0330
Epoch 165/500
6/6 [==============================] - 0s 119us/sample - loss: 0.0323
Epoch 166/500
6/6 [==============================] - 0s 168us/sample - loss: 0.0316
Epoch 167/500
6/6 [==============================] - 0s 115us/sample - loss: 0.0310
Epoch 168/500
6/6 [==============================] - 0s 130us/sample - loss: 0.0303
Epoch 169/500
6/6 [==============================] - 0s 116us/sample - loss: 0.0297
Epoch 170/500
6/6 [==============================] - 0s 135us/sample - loss: 0.0291
Epoch 171/500
6/6 [==============================] - 0s 146us/sample - loss: 0.0285
Epoch 172/500
6/6 [==============================] - 0s 148us/sample - loss: 0.0279
Epoch 173/500
6/6 [==============================] - 0s 130us/sample - loss: 0.0274
Epoch 174/500
6/6 [==============================] - 0s 129us/sample - loss: 0.0268
Epoch 175/500
6/6 [==============================] - 0s 127us/sample - loss: 0.0262
Epoch 176/500
6/6 [==============================] - 0s 140us/sample - loss: 0.0257
Epoch 177/500
6/6 [==============================] - 0s 123us/sample - loss: 0.0252
Epoch 178/500
6/6 [==============================] - 0s 143us/sample - loss: 0.0247
Epoch 179/500
6/6 [==============================] - 0s 134us/sample - loss: 0.0241
Epoch 180/500
6/6 [==============================] - 0s 143us/sample - loss: 0.0237
Epoch 181/500
6/6 [==============================] - 0s 146us/sample - loss: 0.0232
Epoch 182/500
6/6 [==============================] - 0s 159us/sample - loss: 0.0227
Epoch 183/500
6/6 [==============================] - 0s 163us/sample - loss: 0.0222
Epoch 184/500
6/6 [==============================] - 0s 266us/sample - loss: 0.0218
Epoch 185/500
6/6 [==============================] - 0s 331us/sample - loss: 0.0213
Epoch 186/500
6/6 [==============================] - 0s 304us/sample - loss: 0.0209
Epoch 187/500
6/6 [==============================] - 0s 320us/sample - loss: 0.0205
Epoch 188/500
6/6 [==============================] - 0s 322us/sample - loss: 0.0200
Epoch 189/500
6/6 [==============================] - 0s 286us/sample - loss: 0.0196
Epoch 190/500
6/6 [==============================] - 0s 324us/sample - loss: 0.0192
Epoch 191/500
6/6 [==============================] - 0s 424us/sample - loss: 0.0188
Epoch 192/500
6/6 [==============================] - 0s 315us/sample - loss: 0.0184
Epoch 193/500
6/6 [==============================] - 0s 220us/sample - loss: 0.0181
Epoch 194/500
6/6 [==============================] - 0s 245us/sample - loss: 0.0177
Epoch 195/500
6/6 [==============================] - 0s 222us/sample - loss: 0.0173
Epoch 196/500
6/6 [==============================] - 0s 203us/sample - loss: 0.0170
Epoch 197/500
6/6 [==============================] - 0s 227us/sample - loss: 0.0166
Epoch 198/500
6/6 [==============================] - 0s 201us/sample - loss: 0.0163
Epoch 199/500
6/6 [==============================] - 0s 175us/sample - loss: 0.0159
Epoch 200/500
6/6 [==============================] - 0s 147us/sample - loss: 0.0156
Epoch 201/500
6/6 [==============================] - 0s 177us/sample - loss: 0.0153
Epoch 202/500
6/6 [==============================] - 0s 156us/sample - loss: 0.0150
Epoch 203/500
6/6 [==============================] - 0s 141us/sample - loss: 0.0147
Epoch 204/500
6/6 [==============================] - 0s 220us/sample - loss: 0.0144
Epoch 205/500
6/6 [==============================] - 0s 161us/sample - loss: 0.0141
Epoch 206/500
6/6 [==============================] - 0s 147us/sample - loss: 0.0138
Epoch 207/500
6/6 [==============================] - 0s 192us/sample - loss: 0.0135
Epoch 208/500
6/6 [==============================] - 0s 152us/sample - loss: 0.0132
Epoch 209/500
6/6 [==============================] - 0s 165us/sample - loss: 0.0130
Epoch 210/500
6/6 [==============================] - 0s 159us/sample - loss: 0.0127
Epoch 211/500
6/6 [==============================] - 0s 154us/sample - loss: 0.0124
Epoch 212/500
6/6 [==============================] - 0s 155us/sample - loss: 0.0122
Epoch 213/500
6/6 [==============================] - 0s 127us/sample - loss: 0.0119
Epoch 214/500
6/6 [==============================] - 0s 221us/sample - loss: 0.0117
Epoch 215/500
6/6 [==============================] - 0s 188us/sample - loss: 0.0114
Epoch 216/500
6/6 [==============================] - 0s 202us/sample - loss: 0.0112
Epoch 217/500
6/6 [==============================] - 0s 154us/sample - loss: 0.0110
Epoch 218/500
6/6 [==============================] - 0s 186us/sample - loss: 0.0107
Epoch 219/500
6/6 [==============================] - 0s 156us/sample - loss: 0.0105
Epoch 220/500
6/6 [==============================] - 0s 216us/sample - loss: 0.0103
Epoch 221/500
6/6 [==============================] - 0s 153us/sample - loss: 0.0101
Epoch 222/500
6/6 [==============================] - 0s 161us/sample - loss: 0.0099
Epoch 223/500
6/6 [==============================] - 0s 265us/sample - loss: 0.0097
Epoch 224/500
6/6 [==============================] - 0s 212us/sample - loss: 0.0095
Epoch 225/500
6/6 [==============================] - 0s 144us/sample - loss: 0.0093
Epoch 226/500
6/6 [==============================] - 0s 172us/sample - loss: 0.0091
Epoch 227/500
6/6 [==============================] - 0s 209us/sample - loss: 0.0089
Epoch 228/500
6/6 [==============================] - 0s 227us/sample - loss: 0.0087
Epoch 229/500
6/6 [==============================] - 0s 169us/sample - loss: 0.0086
Epoch 230/500
6/6 [==============================] - 0s 160us/sample - loss: 0.0084
Epoch 231/500
6/6 [==============================] - 0s 171us/sample - loss: 0.0082
Epoch 232/500
6/6 [==============================] - 0s 156us/sample - loss: 0.0080
Epoch 233/500
6/6 [==============================] - 0s 187us/sample - loss: 0.0079
Epoch 234/500
6/6 [==============================] - 0s 205us/sample - loss: 0.0077
Epoch 235/500
6/6 [==============================] - 0s 186us/sample - loss: 0.0076
Epoch 236/500
6/6 [==============================] - 0s 171us/sample - loss: 0.0074
Epoch 237/500
6/6 [==============================] - 0s 189us/sample - loss: 0.0072
Epoch 238/500
6/6 [==============================] - 0s 206us/sample - loss: 0.0071
Epoch 239/500
6/6 [==============================] - 0s 207us/sample - loss: 0.0070
Epoch 240/500
6/6 [==============================] - 0s 151us/sample - loss: 0.0068
Epoch 241/500
6/6 [==============================] - 0s 392us/sample - loss: 0.0067
Epoch 242/500
6/6 [==============================] - 0s 164us/sample - loss: 0.0065
Epoch 243/500
6/6 [==============================] - 0s 278us/sample - loss: 0.0064
Epoch 244/500
6/6 [==============================] - 0s 137us/sample - loss: 0.0063
Epoch 245/500
6/6 [==============================] - 0s 150us/sample - loss: 0.0061
Epoch 246/500
6/6 [==============================] - 0s 139us/sample - loss: 0.0060
Epoch 247/500
6/6 [==============================] - 0s 141us/sample - loss: 0.0059
Epoch 248/500
6/6 [==============================] - 0s 303us/sample - loss: 0.0058
Epoch 249/500
6/6 [==============================] - 0s 154us/sample - loss: 0.0056
Epoch 250/500
6/6 [==============================] - 0s 187us/sample - loss: 0.0055
Epoch 251/500
6/6 [==============================] - 0s 226us/sample - loss: 0.0054
Epoch 252/500
6/6 [==============================] - 0s 170us/sample - loss: 0.0053
Epoch 253/500
6/6 [==============================] - 0s 120us/sample - loss: 0.0052
Epoch 254/500
6/6 [==============================] - 0s 248us/sample - loss: 0.0051
Epoch 255/500
6/6 [==============================] - 0s 150us/sample - loss: 0.0050
Epoch 256/500
6/6 [==============================] - 0s 267us/sample - loss: 0.0049
Epoch 257/500
6/6 [==============================] - 0s 300us/sample - loss: 0.0048
Epoch 258/500
6/6 [==============================] - 0s 309us/sample - loss: 0.0047
Epoch 259/500
6/6 [==============================] - 0s 447us/sample - loss: 0.0046
Epoch 260/500
6/6 [==============================] - 0s 209us/sample - loss: 0.0045
Epoch 261/500
6/6 [==============================] - 0s 241us/sample - loss: 0.0044
Epoch 262/500
6/6 [==============================] - 0s 202us/sample - loss: 0.0043
Epoch 263/500
6/6 [==============================] - 0s 223us/sample - loss: 0.0042
Epoch 264/500
6/6 [==============================] - 0s 208us/sample - loss: 0.0041
Epoch 265/500
6/6 [==============================] - 0s 207us/sample - loss: 0.0041
Epoch 266/500
6/6 [==============================] - 0s 170us/sample - loss: 0.0040
Epoch 267/500
6/6 [==============================] - 0s 136us/sample - loss: 0.0039
Epoch 268/500
6/6 [==============================] - 0s 159us/sample - loss: 0.0038
Epoch 269/500
6/6 [==============================] - 0s 177us/sample - loss: 0.0037
Epoch 270/500
6/6 [==============================] - 0s 165us/sample - loss: 0.0037
Epoch 271/500
6/6 [==============================] - 0s 136us/sample - loss: 0.0036
Epoch 272/500
6/6 [==============================] - 0s 202us/sample - loss: 0.0035
Epoch 273/500
6/6 [==============================] - 0s 163us/sample - loss: 0.0034
Epoch 274/500
6/6 [==============================] - 0s 171us/sample - loss: 0.0034
Epoch 275/500
6/6 [==============================] - 0s 160us/sample - loss: 0.0033
Epoch 276/500
6/6 [==============================] - 0s 169us/sample - loss: 0.0032
Epoch 277/500
6/6 [==============================] - 0s 151us/sample - loss: 0.0032
Epoch 278/500
6/6 [==============================] - 0s 163us/sample - loss: 0.0031
Epoch 279/500
6/6 [==============================] - 0s 278us/sample - loss: 0.0030
Epoch 280/500
6/6 [==============================] - 0s 228us/sample - loss: 0.0030
Epoch 281/500
6/6 [==============================] - 0s 179us/sample - loss: 0.0029
Epoch 282/500
6/6 [==============================] - 0s 166us/sample - loss: 0.0028
Epoch 283/500
6/6 [==============================] - 0s 163us/sample - loss: 0.0028
Epoch 284/500
6/6 [==============================] - 0s 228us/sample - loss: 0.0027
Epoch 285/500
6/6 [==============================] - 0s 247us/sample - loss: 0.0027
Epoch 286/500
6/6 [==============================] - 0s 194us/sample - loss: 0.0026
Epoch 287/500
6/6 [==============================] - 0s 158us/sample - loss: 0.0026
Epoch 288/500
6/6 [==============================] - 0s 197us/sample - loss: 0.0025
Epoch 289/500
6/6 [==============================] - 0s 160us/sample - loss: 0.0025
Epoch 290/500
6/6 [==============================] - 0s 172us/sample - loss: 0.0024
Epoch 291/500
6/6 [==============================] - 0s 181us/sample - loss: 0.0024
Epoch 292/500
6/6 [==============================] - 0s 171us/sample - loss: 0.0023
Epoch 293/500
6/6 [==============================] - 0s 185us/sample - loss: 0.0023
Epoch 294/500
6/6 [==============================] - 0s 157us/sample - loss: 0.0022
Epoch 295/500
6/6 [==============================] - 0s 200us/sample - loss: 0.0022
Epoch 296/500
6/6 [==============================] - 0s 189us/sample - loss: 0.0021
Epoch 297/500
6/6 [==============================] - 0s 142us/sample - loss: 0.0021
Epoch 298/500
6/6 [==============================] - 0s 189us/sample - loss: 0.0020
Epoch 299/500
6/6 [==============================] - 0s 154us/sample - loss: 0.0020
Epoch 300/500
6/6 [==============================] - 0s 144us/sample - loss: 0.0020
Epoch 301/500
6/6 [==============================] - 0s 160us/sample - loss: 0.0019
Epoch 302/500
6/6 [==============================] - 0s 198us/sample - loss: 0.0019
Epoch 303/500
6/6 [==============================] - 0s 172us/sample - loss: 0.0018
Epoch 304/500
6/6 [==============================] - 0s 157us/sample - loss: 0.0018
Epoch 305/500
6/6 [==============================] - 0s 143us/sample - loss: 0.0018
Epoch 306/500
6/6 [==============================] - 0s 162us/sample - loss: 0.0017
Epoch 307/500
6/6 [==============================] - 0s 163us/sample - loss: 0.0017
Epoch 308/500
6/6 [==============================] - 0s 189us/sample - loss: 0.0017
Epoch 309/500
6/6 [==============================] - 0s 162us/sample - loss: 0.0016
Epoch 310/500
6/6 [==============================] - 0s 184us/sample - loss: 0.0016
Epoch 311/500
6/6 [==============================] - 0s 173us/sample - loss: 0.0016
Epoch 312/500
6/6 [==============================] - 0s 279us/sample - loss: 0.0015
Epoch 313/500
6/6 [==============================] - 0s 208us/sample - loss: 0.0015
Epoch 314/500
6/6 [==============================] - 0s 157us/sample - loss: 0.0015
Epoch 315/500
6/6 [==============================] - 0s 274us/sample - loss: 0.0014
Epoch 316/500
6/6 [==============================] - 0s 178us/sample - loss: 0.0014
Epoch 317/500
6/6 [==============================] - 0s 212us/sample - loss: 0.0014
Epoch 318/500
6/6 [==============================] - 0s 227us/sample - loss: 0.0013
Epoch 319/500
6/6 [==============================] - 0s 194us/sample - loss: 0.0013
Epoch 320/500
6/6 [==============================] - 0s 205us/sample - loss: 0.0013
Epoch 321/500
6/6 [==============================] - 0s 212us/sample - loss: 0.0013
Epoch 322/500
6/6 [==============================] - 0s 163us/sample - loss: 0.0012
Epoch 323/500
6/6 [==============================] - 0s 286us/sample - loss: 0.0012
Epoch 324/500
6/6 [==============================] - 0s 148us/sample - loss: 0.0012
Epoch 325/500
6/6 [==============================] - 0s 196us/sample - loss: 0.0012
Epoch 326/500
6/6 [==============================] - 0s 251us/sample - loss: 0.0011
Epoch 327/500
6/6 [==============================] - 0s 142us/sample - loss: 0.0011
Epoch 328/500
6/6 [==============================] - 0s 244us/sample - loss: 0.0011
Epoch 329/500
6/6 [==============================] - 0s 176us/sample - loss: 0.0011
Epoch 330/500
6/6 [==============================] - 0s 225us/sample - loss: 0.0011
Epoch 331/500
6/6 [==============================] - 0s 146us/sample - loss: 0.0010
Epoch 332/500
6/6 [==============================] - 0s 230us/sample - loss: 0.0010
Epoch 333/500
6/6 [==============================] - 0s 182us/sample - loss: 9.8813e-04
Epoch 334/500
6/6 [==============================] - 0s 186us/sample - loss: 9.6783e-04
Epoch 335/500
6/6 [==============================] - 0s 156us/sample - loss: 9.4795e-04
Epoch 336/500
6/6 [==============================] - 0s 208us/sample - loss: 9.2848e-04
Epoch 337/500
6/6 [==============================] - 0s 492us/sample - loss: 9.0941e-04
Epoch 338/500
6/6 [==============================] - 0s 155us/sample - loss: 8.9072e-04
Epoch 339/500
6/6 [==============================] - 0s 251us/sample - loss: 8.7243e-04
Epoch 340/500
6/6 [==============================] - 0s 167us/sample - loss: 8.5451e-04
Epoch 341/500
6/6 [==============================] - 0s 225us/sample - loss: 8.3696e-04
Epoch 342/500
6/6 [==============================] - 0s 209us/sample - loss: 8.1977e-04
Epoch 343/500
6/6 [==============================] - 0s 184us/sample - loss: 8.0293e-04
Epoch 344/500
6/6 [==============================] - 0s 662us/sample - loss: 7.8644e-04
Epoch 345/500
6/6 [==============================] - 0s 289us/sample - loss: 7.7028e-04
Epoch 346/500
6/6 [==============================] - 0s 154us/sample - loss: 7.5446e-04
Epoch 347/500
6/6 [==============================] - 0s 183us/sample - loss: 7.3896e-04
Epoch 348/500
6/6 [==============================] - 0s 184us/sample - loss: 7.2378e-04
Epoch 349/500
6/6 [==============================] - 0s 229us/sample - loss: 7.0891e-04
Epoch 350/500
6/6 [==============================] - 0s 149us/sample - loss: 6.9436e-04
Epoch 351/500
6/6 [==============================] - 0s 201us/sample - loss: 6.8009e-04
Epoch 352/500
6/6 [==============================] - 0s 153us/sample - loss: 6.6612e-04
Epoch 353/500
6/6 [==============================] - 0s 323us/sample - loss: 6.5244e-04
Epoch 354/500
6/6 [==============================] - 0s 167us/sample - loss: 6.3904e-04
Epoch 355/500
6/6 [==============================] - 0s 263us/sample - loss: 6.2592e-04
Epoch 356/500
6/6 [==============================] - 0s 179us/sample - loss: 6.1306e-04
Epoch 357/500
6/6 [==============================] - 0s 274us/sample - loss: 6.0046e-04
Epoch 358/500
6/6 [==============================] - 0s 142us/sample - loss: 5.8813e-04
Epoch 359/500
6/6 [==============================] - 0s 220us/sample - loss: 5.7605e-04
Epoch 360/500
6/6 [==============================] - 0s 203us/sample - loss: 5.6422e-04
Epoch 361/500
6/6 [==============================] - 0s 181us/sample - loss: 5.5263e-04
Epoch 362/500
6/6 [==============================] - 0s 240us/sample - loss: 5.4128e-04
Epoch 363/500
6/6 [==============================] - 0s 184us/sample - loss: 5.3016e-04
Epoch 364/500
6/6 [==============================] - 0s 180us/sample - loss: 5.1927e-04
Epoch 365/500
6/6 [==============================] - 0s 156us/sample - loss: 5.0860e-04
Epoch 366/500
6/6 [==============================] - 0s 234us/sample - loss: 4.9816e-04
Epoch 367/500
6/6 [==============================] - 0s 211us/sample - loss: 4.8793e-04
Epoch 368/500
6/6 [==============================] - 0s 185us/sample - loss: 4.7790e-04
Epoch 369/500
6/6 [==============================] - 0s 192us/sample - loss: 4.6809e-04
Epoch 370/500
6/6 [==============================] - 0s 121us/sample - loss: 4.5847e-04
Epoch 371/500
6/6 [==============================] - 0s 229us/sample - loss: 4.4905e-04
Epoch 372/500
6/6 [==============================] - 0s 199us/sample - loss: 4.3983e-04
Epoch 373/500
6/6 [==============================] - 0s 199us/sample - loss: 4.3079e-04
Epoch 374/500
6/6 [==============================] - 0s 184us/sample - loss: 4.2195e-04
Epoch 375/500
6/6 [==============================] - 0s 203us/sample - loss: 4.1328e-04
Epoch 376/500
6/6 [==============================] - 0s 199us/sample - loss: 4.0479e-04
Epoch 377/500
6/6 [==============================] - 0s 171us/sample - loss: 3.9647e-04
Epoch 378/500
6/6 [==============================] - 0s 164us/sample - loss: 3.8833e-04
Epoch 379/500
6/6 [==============================] - 0s 609us/sample - loss: 3.8036e-04
Epoch 380/500
6/6 [==============================] - 0s 179us/sample - loss: 3.7254e-04
Epoch 381/500
6/6 [==============================] - 0s 311us/sample - loss: 3.6489e-04
Epoch 382/500
6/6 [==============================] - 0s 212us/sample - loss: 3.5739e-04
Epoch 383/500
6/6 [==============================] - 0s 224us/sample - loss: 3.5005e-04
Epoch 384/500
6/6 [==============================] - 0s 173us/sample - loss: 3.4286e-04
Epoch 385/500
6/6 [==============================] - 0s 203us/sample - loss: 3.3582e-04
Epoch 386/500
6/6 [==============================] - 0s 248us/sample - loss: 3.2892e-04
Epoch 387/500
6/6 [==============================] - 0s 150us/sample - loss: 3.2217e-04
Epoch 388/500
6/6 [==============================] - 0s 146us/sample - loss: 3.1555e-04
Epoch 389/500
6/6 [==============================] - 0s 234us/sample - loss: 3.0907e-04
Epoch 390/500
6/6 [==============================] - 0s 153us/sample - loss: 3.0272e-04
Epoch 391/500
6/6 [==============================] - 0s 191us/sample - loss: 2.9650e-04
Epoch 392/500
6/6 [==============================] - 0s 137us/sample - loss: 2.9041e-04
Epoch 393/500
6/6 [==============================] - 0s 149us/sample - loss: 2.8444e-04
Epoch 394/500
6/6 [==============================] - 0s 553us/sample - loss: 2.7860e-04
Epoch 395/500
6/6 [==============================] - 0s 193us/sample - loss: 2.7288e-04
Epoch 396/500
6/6 [==============================] - 0s 220us/sample - loss: 2.6727e-04
Epoch 397/500
6/6 [==============================] - 0s 252us/sample - loss: 2.6178e-04
Epoch 398/500
6/6 [==============================] - 0s 182us/sample - loss: 2.5641e-04
Epoch 399/500
6/6 [==============================] - 0s 192us/sample - loss: 2.5114e-04
Epoch 400/500
6/6 [==============================] - 0s 162us/sample - loss: 2.4598e-04
Epoch 401/500
6/6 [==============================] - 0s 295us/sample - loss: 2.4093e-04
Epoch 402/500
6/6 [==============================] - 0s 154us/sample - loss: 2.3598e-04
Epoch 403/500
6/6 [==============================] - 0s 254us/sample - loss: 2.3113e-04
Epoch 404/500
6/6 [==============================] - 0s 146us/sample - loss: 2.2638e-04
Epoch 405/500
6/6 [==============================] - 0s 167us/sample - loss: 2.2174e-04
Epoch 406/500
6/6 [==============================] - 0s 142us/sample - loss: 2.1718e-04
Epoch 407/500
6/6 [==============================] - 0s 148us/sample - loss: 2.1272e-04
Epoch 408/500
6/6 [==============================] - 0s 184us/sample - loss: 2.0835e-04
Epoch 409/500
6/6 [==============================] - 0s 273us/sample - loss: 2.0407e-04
Epoch 410/500
6/6 [==============================] - 0s 176us/sample - loss: 1.9988e-04
Epoch 411/500
6/6 [==============================] - 0s 210us/sample - loss: 1.9577e-04
Epoch 412/500
6/6 [==============================] - 0s 134us/sample - loss: 1.9175e-04
Epoch 413/500
6/6 [==============================] - 0s 177us/sample - loss: 1.8781e-04
Epoch 414/500
6/6 [==============================] - 0s 148us/sample - loss: 1.8395e-04
Epoch 415/500
6/6 [==============================] - 0s 143us/sample - loss: 1.8018e-04
Epoch 416/500
6/6 [==============================] - 0s 209us/sample - loss: 1.7648e-04
Epoch 417/500
6/6 [==============================] - 0s 135us/sample - loss: 1.7285e-04
Epoch 418/500
6/6 [==============================] - 0s 136us/sample - loss: 1.6930e-04
Epoch 419/500
6/6 [==============================] - 0s 391us/sample - loss: 1.6582e-04
Epoch 420/500
6/6 [==============================] - 0s 185us/sample - loss: 1.6242e-04
Epoch 421/500
6/6 [==============================] - 0s 187us/sample - loss: 1.5908e-04
Epoch 422/500
6/6 [==============================] - 0s 256us/sample - loss: 1.5581e-04
Epoch 423/500
6/6 [==============================] - 0s 219us/sample - loss: 1.5261e-04
Epoch 424/500
6/6 [==============================] - 0s 201us/sample - loss: 1.4948e-04
Epoch 425/500
6/6 [==============================] - 0s 167us/sample - loss: 1.4641e-04
Epoch 426/500
6/6 [==============================] - 0s 137us/sample - loss: 1.4340e-04
Epoch 427/500
6/6 [==============================] - 0s 220us/sample - loss: 1.4046e-04
Epoch 428/500
6/6 [==============================] - 0s 201us/sample - loss: 1.3757e-04
Epoch 429/500
6/6 [==============================] - 0s 125us/sample - loss: 1.3474e-04
Epoch 430/500
6/6 [==============================] - 0s 218us/sample - loss: 1.3198e-04
Epoch 431/500
6/6 [==============================] - 0s 225us/sample - loss: 1.2927e-04
Epoch 432/500
6/6 [==============================] - 0s 141us/sample - loss: 1.2661e-04
Epoch 433/500
6/6 [==============================] - 0s 241us/sample - loss: 1.2401e-04
Epoch 434/500
6/6 [==============================] - 0s 191us/sample - loss: 1.2146e-04
Epoch 435/500
6/6 [==============================] - 0s 196us/sample - loss: 1.1897e-04
Epoch 436/500
6/6 [==============================] - 0s 240us/sample - loss: 1.1652e-04
Epoch 437/500
6/6 [==============================] - 0s 194us/sample - loss: 1.1413e-04
Epoch 438/500
6/6 [==============================] - 0s 142us/sample - loss: 1.1178e-04
Epoch 439/500
6/6 [==============================] - 0s 167us/sample - loss: 1.0949e-04
Epoch 440/500
6/6 [==============================] - 0s 164us/sample - loss: 1.0724e-04
Epoch 441/500
6/6 [==============================] - 0s 223us/sample - loss: 1.0504e-04
Epoch 442/500
6/6 [==============================] - 0s 175us/sample - loss: 1.0288e-04
Epoch 443/500
6/6 [==============================] - 0s 222us/sample - loss: 1.0077e-04
Epoch 444/500
6/6 [==============================] - 0s 170us/sample - loss: 9.8698e-05
Epoch 445/500
6/6 [==============================] - 0s 288us/sample - loss: 9.6670e-05
Epoch 446/500
6/6 [==============================] - 0s 202us/sample - loss: 9.4685e-05
Epoch 447/500
6/6 [==============================] - 0s 159us/sample - loss: 9.2739e-05
Epoch 448/500
6/6 [==============================] - 0s 160us/sample - loss: 9.0834e-05
Epoch 449/500
6/6 [==============================] - 0s 280us/sample - loss: 8.8968e-05
Epoch 450/500
6/6 [==============================] - 0s 180us/sample - loss: 8.7139e-05
Epoch 451/500
6/6 [==============================] - 0s 156us/sample - loss: 8.5350e-05
Epoch 452/500
6/6 [==============================] - 0s 196us/sample - loss: 8.3596e-05
Epoch 453/500
6/6 [==============================] - 0s 182us/sample - loss: 8.1880e-05
Epoch 454/500
6/6 [==============================] - 0s 226us/sample - loss: 8.0197e-05
Epoch 455/500
6/6 [==============================] - 0s 168us/sample - loss: 7.8550e-05
Epoch 456/500
6/6 [==============================] - 0s 143us/sample - loss: 7.6937e-05
Epoch 457/500
6/6 [==============================] - 0s 215us/sample - loss: 7.5356e-05
Epoch 458/500
6/6 [==============================] - 0s 201us/sample - loss: 7.3809e-05
Epoch 459/500
6/6 [==============================] - 0s 225us/sample - loss: 7.2293e-05
Epoch 460/500
6/6 [==============================] - 0s 147us/sample - loss: 7.0808e-05
Epoch 461/500
6/6 [==============================] - 0s 189us/sample - loss: 6.9352e-05
Epoch 462/500
6/6 [==============================] - 0s 160us/sample - loss: 6.7929e-05
Epoch 463/500
6/6 [==============================] - 0s 228us/sample - loss: 6.6534e-05
Epoch 464/500
6/6 [==============================] - 0s 243us/sample - loss: 6.5167e-05
Epoch 465/500
6/6 [==============================] - 0s 164us/sample - loss: 6.3828e-05
Epoch 466/500
6/6 [==============================] - 0s 248us/sample - loss: 6.2517e-05
Epoch 467/500
6/6 [==============================] - 0s 177us/sample - loss: 6.1233e-05
Epoch 468/500
6/6 [==============================] - 0s 219us/sample - loss: 5.9975e-05
Epoch 469/500
6/6 [==============================] - 0s 170us/sample - loss: 5.8743e-05
Epoch 470/500
6/6 [==============================] - 0s 229us/sample - loss: 5.7535e-05
Epoch 471/500
6/6 [==============================] - 0s 145us/sample - loss: 5.6354e-05
Epoch 472/500
6/6 [==============================] - 0s 189us/sample - loss: 5.5196e-05
Epoch 473/500
6/6 [==============================] - 0s 136us/sample - loss: 5.4062e-05
Epoch 474/500
6/6 [==============================] - 0s 195us/sample - loss: 5.2953e-05
Epoch 475/500
6/6 [==============================] - 0s 160us/sample - loss: 5.1864e-05
Epoch 476/500
6/6 [==============================] - 0s 145us/sample - loss: 5.0800e-05
Epoch 477/500
6/6 [==============================] - 0s 267us/sample - loss: 4.9756e-05
Epoch 478/500
6/6 [==============================] - 0s 157us/sample - loss: 4.8734e-05
Epoch 479/500
6/6 [==============================] - 0s 244us/sample - loss: 4.7733e-05
Epoch 480/500
6/6 [==============================] - 0s 225us/sample - loss: 4.6752e-05
Epoch 481/500
6/6 [==============================] - 0s 212us/sample - loss: 4.5792e-05
Epoch 482/500
6/6 [==============================] - 0s 212us/sample - loss: 4.4851e-05
Epoch 483/500
6/6 [==============================] - 0s 214us/sample - loss: 4.3930e-05
Epoch 484/500
6/6 [==============================] - 0s 170us/sample - loss: 4.3027e-05
Epoch 485/500
6/6 [==============================] - 0s 210us/sample - loss: 4.2143e-05
Epoch 486/500
6/6 [==============================] - 0s 241us/sample - loss: 4.1278e-05
Epoch 487/500
6/6 [==============================] - 0s 324us/sample - loss: 4.0429e-05
Epoch 488/500
6/6 [==============================] - 0s 163us/sample - loss: 3.9599e-05
Epoch 489/500
6/6 [==============================] - 0s 188us/sample - loss: 3.8786e-05
Epoch 490/500
6/6 [==============================] - 0s 211us/sample - loss: 3.7988e-05
Epoch 491/500
6/6 [==============================] - 0s 223us/sample - loss: 3.7209e-05
Epoch 492/500
6/6 [==============================] - 0s 254us/sample - loss: 3.6444e-05
Epoch 493/500
6/6 [==============================] - 0s 165us/sample - loss: 3.5695e-05
Epoch 494/500
6/6 [==============================] - 0s 269us/sample - loss: 3.4963e-05
Epoch 495/500
6/6 [==============================] - 0s 290us/sample - loss: 3.4244e-05
Epoch 496/500
6/6 [==============================] - 0s 194us/sample - loss: 3.3540e-05
Epoch 497/500
6/6 [==============================] - 0s 244us/sample - loss: 3.2851e-05
Epoch 498/500
6/6 [==============================] - 0s 144us/sample - loss: 3.2176e-05
Epoch 499/500
6/6 [==============================] - 0s 182us/sample - loss: 3.1516e-05
Epoch 500/500
6/6 [==============================] - 0s 197us/sample - loss: 3.0868e-05
[[18.98379]]
(compare with the expected 19.0)
# This is an answer for https://www.coursera.org/learn/introduction-tensorflow/ungradedLti/fF5cn/exercise-1-housing-prices
import tensorflow as tf
import numpy as np
from tensorflow import keras

# Define and Compile the Neural Network
model = tf.keras.Sequential([keras.layers.Dense(units=1, input_shape=[1])])
model.compile(optimizer='sgd', loss='mean_squared_error')

def price(rooms):
    """Provide the price associated to a house with the provided number of rooms.
    Note: this intentionnaly doesn't take into account the suggested hint to use lower value,
    in order to experiment the corresponding results.
    """
    basis = 50e3
    room_cost = 50e3
    return basis + (rooms * room_cost) 

# Building the data sets
volume = 5
seed = [float(number) for number in range(volume)]
pair = [price(number) for number in seed]
protomer = np.array(seed, dtype=float)
deutomer = np.array(pair, dtype=float)
print(f"Data sets generated!\nprotomer: {protomer}\ndeutomer: {deutomer}\n")

# Provide the data and train the neural network¶
model.fit(protomer, deutomer, epochs=500)

# Test the result of the training
target = float(volume + 1)
print(model.predict([target]))
print(f"(compare with the expected {price(target)})")
Data sets generated!
protomer: [0. 1. 2. 3. 4.]
deutomer: [ 50000. 100000. 150000. 200000. 250000.]

Epoch 1/500
5/5 [==============================] - 0s 17ms/sample - loss: 27499145216.0000
Epoch 2/500
5/5 [==============================] - 0s 341us/sample - loss: 20688359424.0000
Epoch 3/500
5/5 [==============================] - 0s 224us/sample - loss: 15580146688.0000
Epoch 4/500
5/5 [==============================] - 0s 184us/sample - loss: 11748704256.0000
Epoch 5/500
5/5 [==============================] - 0s 281us/sample - loss: 8874723328.0000
Epoch 6/500
5/5 [==============================] - 0s 252us/sample - loss: 6718751744.0000
Epoch 7/500
5/5 [==============================] - 0s 282us/sample - loss: 5101229056.0000
Epoch 8/500
5/5 [==============================] - 0s 263us/sample - loss: 3887496704.0000
Epoch 9/500
5/5 [==============================] - 0s 292us/sample - loss: 2976578816.0000
Epoch 10/500
5/5 [==============================] - 0s 199us/sample - loss: 2292749056.0000
Epoch 11/500
5/5 [==============================] - 0s 192us/sample - loss: 1779222528.0000
Epoch 12/500
5/5 [==============================] - 0s 221us/sample - loss: 1393415808.0000
Epoch 13/500
5/5 [==============================] - 0s 197us/sample - loss: 1103394048.0000
Epoch 14/500
5/5 [==============================] - 0s 238us/sample - loss: 885209920.0000
Epoch 15/500
5/5 [==============================] - 0s 219us/sample - loss: 720905792.0000
Epoch 16/500
5/5 [==============================] - 0s 241us/sample - loss: 597014656.0000
Epoch 17/500
5/5 [==============================] - 0s 174us/sample - loss: 503436736.0000
Epoch 18/500
5/5 [==============================] - 0s 186us/sample - loss: 432599360.0000
Epoch 19/500
5/5 [==============================] - 0s 245us/sample - loss: 378822784.0000
Epoch 20/500
5/5 [==============================] - 0s 160us/sample - loss: 337848096.0000
Epoch 21/500
5/5 [==============================] - 0s 207us/sample - loss: 306481056.0000
Epoch 22/500
5/5 [==============================] - 0s 174us/sample - loss: 282326592.0000
Epoch 23/500
5/5 [==============================] - 0s 446us/sample - loss: 263588256.0000
Epoch 24/500
5/5 [==============================] - 0s 476us/sample - loss: 248918944.0000
Epoch 25/500
5/5 [==============================] - 0s 468us/sample - loss: 237308416.0000
Epoch 26/500
5/5 [==============================] - 0s 461us/sample - loss: 227998880.0000
Epoch 27/500
5/5 [==============================] - 0s 220us/sample - loss: 220422016.0000
Epoch 28/500
5/5 [==============================] - 0s 789us/sample - loss: 214151680.0000
Epoch 29/500
5/5 [==============================] - 0s 339us/sample - loss: 208868000.0000
Epoch 30/500
5/5 [==============================] - 0s 251us/sample - loss: 204331280.0000
Epoch 31/500
5/5 [==============================] - 0s 316us/sample - loss: 200361424.0000
Epoch 32/500
5/5 [==============================] - 0s 174us/sample - loss: 196823392.0000
Epoch 33/500
5/5 [==============================] - 0s 210us/sample - loss: 193615952.0000
Epoch 34/500
5/5 [==============================] - 0s 216us/sample - loss: 190662992.0000
Epoch 35/500
5/5 [==============================] - 0s 231us/sample - loss: 187907360.0000
Epoch 36/500
5/5 [==============================] - 0s 534us/sample - loss: 185306192.0000
Epoch 37/500
5/5 [==============================] - 0s 875us/sample - loss: 182827184.0000
Epoch 38/500
5/5 [==============================] - 0s 581us/sample - loss: 180446080.0000
Epoch 39/500
5/5 [==============================] - 0s 307us/sample - loss: 178144608.0000
Epoch 40/500
5/5 [==============================] - 0s 348us/sample - loss: 175909056.0000
Epoch 41/500
5/5 [==============================] - 0s 325us/sample - loss: 173728912.0000
Epoch 42/500
5/5 [==============================] - 0s 396us/sample - loss: 171596384.0000
Epoch 43/500
5/5 [==============================] - 0s 356us/sample - loss: 169505344.0000
Epoch 44/500
5/5 [==============================] - 0s 206us/sample - loss: 167451488.0000
Epoch 45/500
5/5 [==============================] - 0s 212us/sample - loss: 165431200.0000
Epoch 46/500
5/5 [==============================] - 0s 215us/sample - loss: 163441680.0000
Epoch 47/500
5/5 [==============================] - 0s 210us/sample - loss: 161481040.0000
Epoch 48/500
5/5 [==============================] - 0s 211us/sample - loss: 159547584.0000
Epoch 49/500
5/5 [==============================] - 0s 188us/sample - loss: 157640032.0000
Epoch 50/500
5/5 [==============================] - 0s 211us/sample - loss: 155757312.0000
Epoch 51/500
5/5 [==============================] - 0s 198us/sample - loss: 153898688.0000
Epoch 52/500
5/5 [==============================] - 0s 173us/sample - loss: 152063360.0000
Epoch 53/500
5/5 [==============================] - 0s 212us/sample - loss: 150250784.0000
Epoch 54/500
5/5 [==============================] - 0s 209us/sample - loss: 148460464.0000
Epoch 55/500
5/5 [==============================] - 0s 167us/sample - loss: 146691936.0000
Epoch 56/500
5/5 [==============================] - 0s 184us/sample - loss: 144944880.0000
Epoch 57/500
5/5 [==============================] - 0s 184us/sample - loss: 143218928.0000
Epoch 58/500
5/5 [==============================] - 0s 156us/sample - loss: 141513696.0000
Epoch 59/500
5/5 [==============================] - 0s 135us/sample - loss: 139828960.0000
Epoch 60/500
5/5 [==============================] - 0s 186us/sample - loss: 138164336.0000
Epoch 61/500
5/5 [==============================] - 0s 184us/sample - loss: 136519680.0000
Epoch 62/500
5/5 [==============================] - 0s 187us/sample - loss: 134894576.0000
Epoch 63/500
5/5 [==============================] - 0s 153us/sample - loss: 133288912.0000
Epoch 64/500
5/5 [==============================] - 0s 170us/sample - loss: 131702424.0000
Epoch 65/500
5/5 [==============================] - 0s 171us/sample - loss: 130134848.0000
Epoch 66/500
5/5 [==============================] - 0s 412us/sample - loss: 128585904.0000
Epoch 67/500
5/5 [==============================] - 0s 319us/sample - loss: 127055440.0000
Epoch 68/500
5/5 [==============================] - 0s 175us/sample - loss: 125543168.0000
Epoch 69/500
5/5 [==============================] - 0s 164us/sample - loss: 124048944.0000
Epoch 70/500
5/5 [==============================] - 0s 158us/sample - loss: 122572528.0000
Epoch 71/500
5/5 [==============================] - 0s 157us/sample - loss: 121113680.0000
Epoch 72/500
5/5 [==============================] - 0s 169us/sample - loss: 119672176.0000
Epoch 73/500
5/5 [==============================] - 0s 175us/sample - loss: 118247856.0000
Epoch 74/500
5/5 [==============================] - 0s 164us/sample - loss: 116840432.0000
Epoch 75/500
5/5 [==============================] - 0s 243us/sample - loss: 115449792.0000
Epoch 76/500
5/5 [==============================] - 0s 187us/sample - loss: 114075712.0000
Epoch 77/500
5/5 [==============================] - 0s 174us/sample - loss: 112718016.0000
Epoch 78/500
5/5 [==============================] - 0s 180us/sample - loss: 111376424.0000
Epoch 79/500
5/5 [==============================] - 0s 175us/sample - loss: 110050856.0000
Epoch 80/500
5/5 [==============================] - 0s 186us/sample - loss: 108741040.0000
Epoch 81/500
5/5 [==============================] - 0s 189us/sample - loss: 107446800.0000
Epoch 82/500
5/5 [==============================] - 0s 161us/sample - loss: 106167968.0000
Epoch 83/500
5/5 [==============================] - 0s 165us/sample - loss: 104904408.0000
Epoch 84/500
5/5 [==============================] - 0s 167us/sample - loss: 103655808.0000
Epoch 85/500
5/5 [==============================] - 0s 172us/sample - loss: 102422072.0000
Epoch 86/500
5/5 [==============================] - 0s 182us/sample - loss: 101203080.0000
Epoch 87/500
5/5 [==============================] - 0s 194us/sample - loss: 99998592.0000
Epoch 88/500
5/5 [==============================] - 0s 157us/sample - loss: 98808408.0000
Epoch 89/500
5/5 [==============================] - 0s 192us/sample - loss: 97632416.0000
Epoch 90/500
5/5 [==============================] - 0s 144us/sample - loss: 96470424.0000
Epoch 91/500
5/5 [==============================] - 0s 275us/sample - loss: 95322192.0000
Epoch 92/500
5/5 [==============================] - 0s 174us/sample - loss: 94187640.0000
Epoch 93/500
5/5 [==============================] - 0s 164us/sample - loss: 93066680.0000
Epoch 94/500
5/5 [==============================] - 0s 176us/sample - loss: 91959000.0000
Epoch 95/500
5/5 [==============================] - 0s 158us/sample - loss: 90864544.0000
Epoch 96/500
5/5 [==============================] - 0s 166us/sample - loss: 89783056.0000
Epoch 97/500
5/5 [==============================] - 0s 184us/sample - loss: 88714504.0000
Epoch 98/500
5/5 [==============================] - 0s 165us/sample - loss: 87658648.0000
Epoch 99/500
5/5 [==============================] - 0s 189us/sample - loss: 86615336.0000
Epoch 100/500
5/5 [==============================] - 0s 165us/sample - loss: 85584464.0000
Epoch 101/500
5/5 [==============================] - 0s 142us/sample - loss: 84565784.0000
Epoch 102/500
5/5 [==============================] - 0s 159us/sample - loss: 83559288.0000
Epoch 103/500
5/5 [==============================] - 0s 168us/sample - loss: 82564784.0000
Epoch 104/500
5/5 [==============================] - 0s 170us/sample - loss: 81582096.0000
Epoch 105/500
5/5 [==============================] - 0s 151us/sample - loss: 80611120.0000
Epoch 106/500
5/5 [==============================] - 0s 178us/sample - loss: 79651688.0000
Epoch 107/500
5/5 [==============================] - 0s 210us/sample - loss: 78703688.0000
Epoch 108/500
5/5 [==============================] - 0s 277us/sample - loss: 77766992.0000
Epoch 109/500
5/5 [==============================] - 0s 176us/sample - loss: 76841408.0000
Epoch 110/500
5/5 [==============================] - 0s 277us/sample - loss: 75926832.0000
Epoch 111/500
5/5 [==============================] - 0s 161us/sample - loss: 75023168.0000
Epoch 112/500
5/5 [==============================] - 0s 200us/sample - loss: 74130240.0000
Epoch 113/500
5/5 [==============================] - 0s 225us/sample - loss: 73247992.0000
Epoch 114/500
5/5 [==============================] - 0s 169us/sample - loss: 72376176.0000
Epoch 115/500
5/5 [==============================] - 0s 190us/sample - loss: 71514800.0000
Epoch 116/500
5/5 [==============================] - 0s 161us/sample - loss: 70663584.0000
Epoch 117/500
5/5 [==============================] - 0s 149us/sample - loss: 69822608.0000
Epoch 118/500
5/5 [==============================] - 0s 183us/sample - loss: 68991584.0000
Epoch 119/500
5/5 [==============================] - 0s 163us/sample - loss: 68170496.0000
Epoch 120/500
5/5 [==============================] - 0s 160us/sample - loss: 67359136.0000
Epoch 121/500
5/5 [==============================] - 0s 264us/sample - loss: 66557384.0000
Epoch 122/500
5/5 [==============================] - 0s 188us/sample - loss: 65765204.0000
Epoch 123/500
5/5 [==============================] - 0s 188us/sample - loss: 64982472.0000
Epoch 124/500
5/5 [==============================] - 0s 180us/sample - loss: 64209080.0000
Epoch 125/500
5/5 [==============================] - 0s 169us/sample - loss: 63444888.0000
Epoch 126/500
5/5 [==============================] - 0s 214us/sample - loss: 62689752.0000
Epoch 127/500
5/5 [==============================] - 0s 260us/sample - loss: 61943656.0000
Epoch 128/500
5/5 [==============================] - 0s 197us/sample - loss: 61206380.0000
Epoch 129/500
5/5 [==============================] - 0s 149us/sample - loss: 60477896.0000
Epoch 130/500
5/5 [==============================] - 0s 180us/sample - loss: 59758112.0000
Epoch 131/500
5/5 [==============================] - 0s 172us/sample - loss: 59046872.0000
Epoch 132/500
5/5 [==============================] - 0s 208us/sample - loss: 58344128.0000
Epoch 133/500
5/5 [==============================] - 0s 243us/sample - loss: 57649728.0000
Epoch 134/500
5/5 [==============================] - 0s 175us/sample - loss: 56963560.0000
Epoch 135/500
5/5 [==============================] - 0s 187us/sample - loss: 56285588.0000
Epoch 136/500
5/5 [==============================] - 0s 176us/sample - loss: 55615704.0000
Epoch 137/500
5/5 [==============================] - 0s 180us/sample - loss: 54953804.0000
Epoch 138/500
5/5 [==============================] - 0s 161us/sample - loss: 54299712.0000
Epoch 139/500
5/5 [==============================] - 0s 232us/sample - loss: 53653464.0000
Epoch 140/500
5/5 [==============================] - 0s 158us/sample - loss: 53014892.0000
Epoch 141/500
5/5 [==============================] - 0s 202us/sample - loss: 52383912.0000
Epoch 142/500
5/5 [==============================] - 0s 321us/sample - loss: 51760456.0000
Epoch 143/500
5/5 [==============================] - 0s 184us/sample - loss: 51144388.0000
Epoch 144/500
5/5 [==============================] - 0s 219us/sample - loss: 50535700.0000
Epoch 145/500
5/5 [==============================] - 0s 197us/sample - loss: 49934216.0000
Epoch 146/500
5/5 [==============================] - 0s 188us/sample - loss: 49339876.0000
Epoch 147/500
5/5 [==============================] - 0s 163us/sample - loss: 48752668.0000
Epoch 148/500
5/5 [==============================] - 0s 183us/sample - loss: 48172428.0000
Epoch 149/500
5/5 [==============================] - 0s 164us/sample - loss: 47599076.0000
Epoch 150/500
5/5 [==============================] - 0s 198us/sample - loss: 47032544.0000
Epoch 151/500
5/5 [==============================] - 0s 151us/sample - loss: 46472788.0000
Epoch 152/500
5/5 [==============================] - 0s 162us/sample - loss: 45919672.0000
Epoch 153/500
5/5 [==============================] - 0s 162us/sample - loss: 45373108.0000
Epoch 154/500
5/5 [==============================] - 0s 174us/sample - loss: 44833112.0000
Epoch 155/500
5/5 [==============================] - 0s 171us/sample - loss: 44299504.0000
Epoch 156/500
5/5 [==============================] - 0s 162us/sample - loss: 43772244.0000
Epoch 157/500
5/5 [==============================] - 0s 163us/sample - loss: 43251324.0000
Epoch 158/500
5/5 [==============================] - 0s 153us/sample - loss: 42736528.0000
Epoch 159/500
5/5 [==============================] - 0s 170us/sample - loss: 42227880.0000
Epoch 160/500
5/5 [==============================] - 0s 194us/sample - loss: 41725316.0000
Epoch 161/500
5/5 [==============================] - 0s 155us/sample - loss: 41228696.0000
Epoch 162/500
5/5 [==============================] - 0s 161us/sample - loss: 40738016.0000
Epoch 163/500
5/5 [==============================] - 0s 156us/sample - loss: 40253132.0000
Epoch 164/500
5/5 [==============================] - 0s 242us/sample - loss: 39774068.0000
Epoch 165/500
5/5 [==============================] - 0s 177us/sample - loss: 39300664.0000
Epoch 166/500
5/5 [==============================] - 0s 241us/sample - loss: 38832928.0000
Epoch 167/500
5/5 [==============================] - 0s 192us/sample - loss: 38370728.0000
Epoch 168/500
5/5 [==============================] - 0s 249us/sample - loss: 37914088.0000
Epoch 169/500
5/5 [==============================] - 0s 236us/sample - loss: 37462836.0000
Epoch 170/500
5/5 [==============================] - 0s 180us/sample - loss: 37016904.0000
Epoch 171/500
5/5 [==============================] - 0s 167us/sample - loss: 36576364.0000
Epoch 172/500
5/5 [==============================] - 0s 169us/sample - loss: 36141024.0000
Epoch 173/500
5/5 [==============================] - 0s 143us/sample - loss: 35710916.0000
Epoch 174/500
5/5 [==============================] - 0s 239us/sample - loss: 35285872.0000
Epoch 175/500
5/5 [==============================] - 0s 228us/sample - loss: 34865900.0000
Epoch 176/500
5/5 [==============================] - 0s 152us/sample - loss: 34450944.0000
Epoch 177/500
5/5 [==============================] - 0s 173us/sample - loss: 34040904.0000
Epoch 178/500
5/5 [==============================] - 0s 134us/sample - loss: 33635720.0000
Epoch 179/500
5/5 [==============================] - 0s 248us/sample - loss: 33235430.0000
Epoch 180/500
5/5 [==============================] - 0s 221us/sample - loss: 32839852.0000
Epoch 181/500
5/5 [==============================] - 0s 183us/sample - loss: 32449036.0000
Epoch 182/500
5/5 [==============================] - 0s 160us/sample - loss: 32062812.0000
Epoch 183/500
5/5 [==============================] - 0s 206us/sample - loss: 31681180.0000
Epoch 184/500
5/5 [==============================] - 0s 153us/sample - loss: 31304160.0000
Epoch 185/500
5/5 [==============================] - 0s 316us/sample - loss: 30931552.0000
Epoch 186/500
5/5 [==============================] - 0s 158us/sample - loss: 30563420.0000
Epoch 187/500
5/5 [==============================] - 0s 171us/sample - loss: 30199668.0000
Epoch 188/500
5/5 [==============================] - 0s 150us/sample - loss: 29840240.0000
Epoch 189/500
5/5 [==============================] - 0s 165us/sample - loss: 29485072.0000
Epoch 190/500
5/5 [==============================] - 0s 141us/sample - loss: 29134140.0000
Epoch 191/500
5/5 [==============================] - 0s 161us/sample - loss: 28787418.0000
Epoch 192/500
5/5 [==============================] - 0s 166us/sample - loss: 28444784.0000
Epoch 193/500
5/5 [==============================] - 0s 146us/sample - loss: 28106234.0000
Epoch 194/500
5/5 [==============================] - 0s 163us/sample - loss: 27771702.0000
Epoch 195/500
5/5 [==============================] - 0s 162us/sample - loss: 27441184.0000
Epoch 196/500
5/5 [==============================] - 0s 295us/sample - loss: 27114556.0000
Epoch 197/500
5/5 [==============================] - 0s 135us/sample - loss: 26791836.0000
Epoch 198/500
5/5 [==============================] - 0s 175us/sample - loss: 26473008.0000
Epoch 199/500
5/5 [==============================] - 0s 182us/sample - loss: 26157880.0000
Epoch 200/500
5/5 [==============================] - 0s 405us/sample - loss: 25846564.0000
Epoch 201/500
5/5 [==============================] - 0s 169us/sample - loss: 25538954.0000
Epoch 202/500
5/5 [==============================] - 0s 171us/sample - loss: 25234990.0000
Epoch 203/500
5/5 [==============================] - 0s 195us/sample - loss: 24934652.0000
Epoch 204/500
5/5 [==============================] - 0s 174us/sample - loss: 24637854.0000
Epoch 205/500
5/5 [==============================] - 0s 239us/sample - loss: 24344618.0000
Epoch 206/500
5/5 [==============================] - 0s 264us/sample - loss: 24054874.0000
Epoch 207/500
5/5 [==============================] - 0s 178us/sample - loss: 23768564.0000
Epoch 208/500
5/5 [==============================] - 0s 289us/sample - loss: 23485682.0000
Epoch 209/500
5/5 [==============================] - 0s 181us/sample - loss: 23206162.0000
Epoch 210/500
5/5 [==============================] - 0s 230us/sample - loss: 22929950.0000
Epoch 211/500
5/5 [==============================] - 0s 240us/sample - loss: 22657022.0000
Epoch 212/500
5/5 [==============================] - 0s 273us/sample - loss: 22387356.0000
Epoch 213/500
5/5 [==============================] - 0s 278us/sample - loss: 22120922.0000
Epoch 214/500
5/5 [==============================] - 0s 148us/sample - loss: 21857638.0000
Epoch 215/500
5/5 [==============================] - 0s 186us/sample - loss: 21597482.0000
Epoch 216/500
5/5 [==============================] - 0s 355us/sample - loss: 21340406.0000
Epoch 217/500
5/5 [==============================] - 0s 164us/sample - loss: 21086422.0000
Epoch 218/500
5/5 [==============================] - 0s 215us/sample - loss: 20835432.0000
Epoch 219/500
5/5 [==============================] - 0s 255us/sample - loss: 20587462.0000
Epoch 220/500
5/5 [==============================] - 0s 168us/sample - loss: 20342444.0000
Epoch 221/500
5/5 [==============================] - 0s 197us/sample - loss: 20100332.0000
Epoch 222/500
5/5 [==============================] - 0s 186us/sample - loss: 19861080.0000
Epoch 223/500
5/5 [==============================] - 0s 176us/sample - loss: 19624698.0000
Epoch 224/500
5/5 [==============================] - 0s 184us/sample - loss: 19391136.0000
Epoch 225/500
5/5 [==============================] - 0s 206us/sample - loss: 19160356.0000
Epoch 226/500
5/5 [==============================] - 0s 160us/sample - loss: 18932304.0000
Epoch 227/500
5/5 [==============================] - 0s 184us/sample - loss: 18706992.0000
Epoch 228/500
5/5 [==============================] - 0s 194us/sample - loss: 18484340.0000
Epoch 229/500
5/5 [==============================] - 0s 180us/sample - loss: 18264362.0000
Epoch 230/500
5/5 [==============================] - 0s 202us/sample - loss: 18046978.0000
Epoch 231/500
5/5 [==============================] - 0s 159us/sample - loss: 17832192.0000
Epoch 232/500
5/5 [==============================] - 0s 164us/sample - loss: 17619952.0000
Epoch 233/500
5/5 [==============================] - 0s 177us/sample - loss: 17410252.0000
Epoch 234/500
5/5 [==============================] - 0s 184us/sample - loss: 17203026.0000
Epoch 235/500
5/5 [==============================] - 0s 154us/sample - loss: 16998292.0000
Epoch 236/500
5/5 [==============================] - 0s 149us/sample - loss: 16795958.0000
Epoch 237/500
5/5 [==============================] - 0s 205us/sample - loss: 16596062.0000
Epoch 238/500
5/5 [==============================] - 0s 159us/sample - loss: 16398538.0000
Epoch 239/500
5/5 [==============================] - 0s 181us/sample - loss: 16203387.0000
Epoch 240/500
5/5 [==============================] - 0s 280us/sample - loss: 16010522.0000
Epoch 241/500
5/5 [==============================] - 0s 167us/sample - loss: 15819973.0000
Epoch 242/500
5/5 [==============================] - 0s 205us/sample - loss: 15631682.0000
Epoch 243/500
5/5 [==============================] - 0s 167us/sample - loss: 15445637.0000
Epoch 244/500
5/5 [==============================] - 0s 179us/sample - loss: 15261792.0000
Epoch 245/500
5/5 [==============================] - 0s 172us/sample - loss: 15080155.0000
Epoch 246/500
5/5 [==============================] - 0s 230us/sample - loss: 14900674.0000
Epoch 247/500
5/5 [==============================] - 0s 183us/sample - loss: 14723331.0000
Epoch 248/500
5/5 [==============================] - 0s 213us/sample - loss: 14548109.0000
Epoch 249/500
5/5 [==============================] - 0s 190us/sample - loss: 14374966.0000
Epoch 250/500
5/5 [==============================] - 0s 196us/sample - loss: 14203856.0000
Epoch 251/500
5/5 [==============================] - 0s 210us/sample - loss: 14034829.0000
Epoch 252/500
5/5 [==============================] - 0s 199us/sample - loss: 13867787.0000
Epoch 253/500
5/5 [==============================] - 0s 273us/sample - loss: 13702726.0000
Epoch 254/500
5/5 [==============================] - 0s 196us/sample - loss: 13539654.0000
Epoch 255/500
5/5 [==============================] - 0s 203us/sample - loss: 13378490.0000
Epoch 256/500
5/5 [==============================] - 0s 166us/sample - loss: 13219253.0000
Epoch 257/500
5/5 [==============================] - 0s 184us/sample - loss: 13061929.0000
Epoch 258/500
5/5 [==============================] - 0s 188us/sample - loss: 12906457.0000
Epoch 259/500
5/5 [==============================] - 0s 325us/sample - loss: 12752862.0000
Epoch 260/500
5/5 [==============================] - 0s 214us/sample - loss: 12601066.0000
Epoch 261/500
5/5 [==============================] - 0s 227us/sample - loss: 12451106.0000
Epoch 262/500
5/5 [==============================] - 0s 211us/sample - loss: 12302914.0000
Epoch 263/500
5/5 [==============================] - 0s 159us/sample - loss: 12156483.0000
Epoch 264/500
5/5 [==============================] - 0s 164us/sample - loss: 12011819.0000
Epoch 265/500
5/5 [==============================] - 0s 174us/sample - loss: 11868840.0000
Epoch 266/500
5/5 [==============================] - 0s 215us/sample - loss: 11727581.0000
Epoch 267/500
5/5 [==============================] - 0s 174us/sample - loss: 11587992.0000
Epoch 268/500
5/5 [==============================] - 0s 162us/sample - loss: 11450059.0000
Epoch 269/500
5/5 [==============================] - 0s 164us/sample - loss: 11313800.0000
Epoch 270/500
5/5 [==============================] - 0s 194us/sample - loss: 11179146.0000
Epoch 271/500
5/5 [==============================] - 0s 170us/sample - loss: 11046080.0000
Epoch 272/500
5/5 [==============================] - 0s 166us/sample - loss: 10914613.0000
Epoch 273/500
5/5 [==============================] - 0s 203us/sample - loss: 10784702.0000
Epoch 274/500
5/5 [==============================] - 0s 224us/sample - loss: 10656341.0000
Epoch 275/500
5/5 [==============================] - 0s 158us/sample - loss: 10529511.0000
Epoch 276/500
5/5 [==============================] - 0s 202us/sample - loss: 10404197.0000
Epoch 277/500
5/5 [==============================] - 0s 171us/sample - loss: 10280366.0000
Epoch 278/500
5/5 [==============================] - 0s 208us/sample - loss: 10158012.0000
Epoch 279/500
5/5 [==============================] - 0s 216us/sample - loss: 10037110.0000
Epoch 280/500
5/5 [==============================] - 0s 249us/sample - loss: 9917652.0000
Epoch 281/500
5/5 [==============================] - 0s 183us/sample - loss: 9799610.0000
Epoch 282/500
5/5 [==============================] - 0s 144us/sample - loss: 9682968.0000
Epoch 283/500
5/5 [==============================] - 0s 309us/sample - loss: 9567728.0000
Epoch 284/500
5/5 [==============================] - 0s 211us/sample - loss: 9453853.0000
Epoch 285/500
5/5 [==============================] - 0s 157us/sample - loss: 9341341.0000
Epoch 286/500
5/5 [==============================] - 0s 241us/sample - loss: 9230166.0000
Epoch 287/500
5/5 [==============================] - 0s 233us/sample - loss: 9120294.0000
Epoch 288/500
5/5 [==============================] - 0s 177us/sample - loss: 9011750.0000
Epoch 289/500
5/5 [==============================] - 0s 165us/sample - loss: 8904504.0000
Epoch 290/500
5/5 [==============================] - 0s 175us/sample - loss: 8798510.0000
Epoch 291/500
5/5 [==============================] - 0s 240us/sample - loss: 8693797.0000
Epoch 292/500
5/5 [==============================] - 0s 226us/sample - loss: 8590329.0000
Epoch 293/500
5/5 [==============================] - 0s 268us/sample - loss: 8488072.0000
Epoch 294/500
5/5 [==============================] - 0s 199us/sample - loss: 8387042.5000
Epoch 295/500
5/5 [==============================] - 0s 142us/sample - loss: 8287217.0000
Epoch 296/500
5/5 [==============================] - 0s 222us/sample - loss: 8188598.5000
Epoch 297/500
5/5 [==============================] - 0s 159us/sample - loss: 8091130.5000
Epoch 298/500
5/5 [==============================] - 0s 184us/sample - loss: 7994825.0000
Epoch 299/500
5/5 [==============================] - 0s 213us/sample - loss: 7899665.0000
Epoch 300/500
5/5 [==============================] - 0s 290us/sample - loss: 7805644.0000
Epoch 301/500
5/5 [==============================] - 0s 255us/sample - loss: 7712753.0000
Epoch 302/500
5/5 [==============================] - 0s 220us/sample - loss: 7620955.0000
Epoch 303/500
5/5 [==============================] - 0s 269us/sample - loss: 7530246.5000
Epoch 304/500
5/5 [==============================] - 0s 172us/sample - loss: 7440632.0000
Epoch 305/500
5/5 [==============================] - 0s 163us/sample - loss: 7352049.5000
Epoch 306/500
5/5 [==============================] - 0s 173us/sample - loss: 7264549.0000
Epoch 307/500
5/5 [==============================] - 0s 179us/sample - loss: 7178090.5000
Epoch 308/500
5/5 [==============================] - 0s 230us/sample - loss: 7092660.0000
Epoch 309/500
5/5 [==============================] - 0s 254us/sample - loss: 7008238.5000
Epoch 310/500
5/5 [==============================] - 0s 250us/sample - loss: 6924825.5000
Epoch 311/500
5/5 [==============================] - 0s 319us/sample - loss: 6842416.0000
Epoch 312/500
5/5 [==============================] - 0s 183us/sample - loss: 6760979.0000
Epoch 313/500
5/5 [==============================] - 0s 257us/sample - loss: 6680514.5000
Epoch 314/500
5/5 [==============================] - 0s 273us/sample - loss: 6600994.0000
Epoch 315/500
5/5 [==============================] - 0s 251us/sample - loss: 6522445.0000
Epoch 316/500
5/5 [==============================] - 0s 256us/sample - loss: 6444813.0000
Epoch 317/500
5/5 [==============================] - 0s 220us/sample - loss: 6368104.0000
Epoch 318/500
5/5 [==============================] - 0s 228us/sample - loss: 6292309.0000
Epoch 319/500
5/5 [==============================] - 0s 182us/sample - loss: 6217421.0000
Epoch 320/500
5/5 [==============================] - 0s 402us/sample - loss: 6143425.0000
Epoch 321/500
5/5 [==============================] - 0s 160us/sample - loss: 6070315.0000
Epoch 322/500
5/5 [==============================] - 0s 164us/sample - loss: 5998053.5000
Epoch 323/500
5/5 [==============================] - 0s 215us/sample - loss: 5926664.5000
Epoch 324/500
5/5 [==============================] - 0s 171us/sample - loss: 5856133.0000
Epoch 325/500
5/5 [==============================] - 0s 210us/sample - loss: 5786441.0000
Epoch 326/500
5/5 [==============================] - 0s 197us/sample - loss: 5717558.5000
Epoch 327/500
5/5 [==============================] - 0s 200us/sample - loss: 5649522.5000
Epoch 328/500
5/5 [==============================] - 0s 194us/sample - loss: 5582280.0000
Epoch 329/500
5/5 [==============================] - 0s 239us/sample - loss: 5515841.5000
Epoch 330/500
5/5 [==============================] - 0s 298us/sample - loss: 5450196.0000
Epoch 331/500
5/5 [==============================] - 0s 190us/sample - loss: 5385318.5000
Epoch 332/500
5/5 [==============================] - 0s 151us/sample - loss: 5321226.0000
Epoch 333/500
5/5 [==============================] - 0s 153us/sample - loss: 5257896.0000
Epoch 334/500
5/5 [==============================] - 0s 172us/sample - loss: 5195327.0000
Epoch 335/500
5/5 [==============================] - 0s 189us/sample - loss: 5133484.0000
Epoch 336/500
5/5 [==============================] - 0s 189us/sample - loss: 5072376.0000
Epoch 337/500
5/5 [==============================] - 0s 161us/sample - loss: 5012017.5000
Epoch 338/500
5/5 [==============================] - 0s 144us/sample - loss: 4952360.0000
Epoch 339/500
5/5 [==============================] - 0s 224us/sample - loss: 4893420.5000
Epoch 340/500
5/5 [==============================] - 0s 182us/sample - loss: 4835173.0000
Epoch 341/500
5/5 [==============================] - 0s 150us/sample - loss: 4777621.5000
Epoch 342/500
5/5 [==============================] - 0s 166us/sample - loss: 4720761.0000
Epoch 343/500
5/5 [==============================] - 0s 157us/sample - loss: 4664568.0000
Epoch 344/500
5/5 [==============================] - 0s 315us/sample - loss: 4609052.5000
Epoch 345/500
5/5 [==============================] - 0s 193us/sample - loss: 4554197.5000
Epoch 346/500
5/5 [==============================] - 0s 190us/sample - loss: 4499987.0000
Epoch 347/500
5/5 [==============================] - 0s 240us/sample - loss: 4446429.0000
Epoch 348/500
5/5 [==============================] - 0s 170us/sample - loss: 4393507.0000
Epoch 349/500
5/5 [==============================] - 0s 177us/sample - loss: 4341219.5000
Epoch 350/500
5/5 [==============================] - 0s 187us/sample - loss: 4289557.0000
Epoch 351/500
5/5 [==============================] - 0s 190us/sample - loss: 4238499.0000
Epoch 352/500
5/5 [==============================] - 0s 242us/sample - loss: 4188054.0000
Epoch 353/500
5/5 [==============================] - 0s 183us/sample - loss: 4138213.5000
Epoch 354/500
5/5 [==============================] - 0s 228us/sample - loss: 4088958.7500
Epoch 355/500
5/5 [==============================] - 0s 213us/sample - loss: 4040306.5000
Epoch 356/500
5/5 [==============================] - 0s 173us/sample - loss: 3992216.7500
Epoch 357/500
5/5 [==============================] - 0s 213us/sample - loss: 3944689.2500
Epoch 358/500
5/5 [==============================] - 0s 164us/sample - loss: 3897742.0000
Epoch 359/500
5/5 [==============================] - 0s 172us/sample - loss: 3851353.5000
Epoch 360/500
5/5 [==============================] - 0s 165us/sample - loss: 3805519.2500
Epoch 361/500
5/5 [==============================] - 0s 161us/sample - loss: 3760221.2500
Epoch 362/500
5/5 [==============================] - 0s 178us/sample - loss: 3715459.5000
Epoch 363/500
5/5 [==============================] - 0s 170us/sample - loss: 3671234.7500
Epoch 364/500
5/5 [==============================] - 0s 151us/sample - loss: 3627543.2500
Epoch 365/500
5/5 [==============================] - 0s 228us/sample - loss: 3584373.2500
Epoch 366/500
5/5 [==============================] - 0s 294us/sample - loss: 3541708.5000
Epoch 367/500
5/5 [==============================] - 0s 322us/sample - loss: 3499554.0000
Epoch 368/500
5/5 [==============================] - 0s 157us/sample - loss: 3457902.5000
Epoch 369/500
5/5 [==============================] - 0s 177us/sample - loss: 3416760.7500
Epoch 370/500
5/5 [==============================] - 0s 186us/sample - loss: 3376088.7500
Epoch 371/500
5/5 [==============================] - 0s 259us/sample - loss: 3335905.0000
Epoch 372/500
5/5 [==============================] - 0s 216us/sample - loss: 3296195.5000
Epoch 373/500
5/5 [==============================] - 0s 154us/sample - loss: 3256956.7500
Epoch 374/500
5/5 [==============================] - 0s 218us/sample - loss: 3218198.2500
Epoch 375/500
5/5 [==============================] - 0s 164us/sample - loss: 3179903.0000
Epoch 376/500
5/5 [==============================] - 0s 138us/sample - loss: 3142049.2500
Epoch 377/500
5/5 [==============================] - 0s 180us/sample - loss: 3104657.5000
Epoch 378/500
5/5 [==============================] - 0s 181us/sample - loss: 3067702.0000
Epoch 379/500
5/5 [==============================] - 0s 158us/sample - loss: 3031183.2500
Epoch 380/500
5/5 [==============================] - 0s 182us/sample - loss: 2995110.5000
Epoch 381/500
5/5 [==============================] - 0s 138us/sample - loss: 2959462.5000
Epoch 382/500
5/5 [==============================] - 0s 190us/sample - loss: 2924241.5000
Epoch 383/500
5/5 [==============================] - 0s 208us/sample - loss: 2889443.5000
Epoch 384/500
5/5 [==============================] - 0s 175us/sample - loss: 2855057.5000
Epoch 385/500
5/5 [==============================] - 0s 217us/sample - loss: 2821076.7500
Epoch 386/500
5/5 [==============================] - 0s 213us/sample - loss: 2787491.2500
Epoch 387/500
5/5 [==============================] - 0s 160us/sample - loss: 2754321.2500
Epoch 388/500
5/5 [==============================] - 0s 220us/sample - loss: 2721534.5000
Epoch 389/500
5/5 [==============================] - 0s 208us/sample - loss: 2689144.2500
Epoch 390/500
5/5 [==============================] - 0s 231us/sample - loss: 2657139.7500
Epoch 391/500
5/5 [==============================] - 0s 150us/sample - loss: 2625524.7500
Epoch 392/500
5/5 [==============================] - 0s 240us/sample - loss: 2594270.0000
Epoch 393/500
5/5 [==============================] - 0s 211us/sample - loss: 2563398.0000
Epoch 394/500
5/5 [==============================] - 0s 192us/sample - loss: 2532882.0000
Epoch 395/500
5/5 [==============================] - 0s 164us/sample - loss: 2502733.5000
Epoch 396/500
5/5 [==============================] - 0s 199us/sample - loss: 2472946.0000
Epoch 397/500
5/5 [==============================] - 0s 168us/sample - loss: 2443513.5000
Epoch 398/500
5/5 [==============================] - 0s 165us/sample - loss: 2414437.0000
Epoch 399/500
5/5 [==============================] - 0s 166us/sample - loss: 2385692.5000
Epoch 400/500
5/5 [==============================] - 0s 174us/sample - loss: 2357298.7500
Epoch 401/500
5/5 [==============================] - 0s 185us/sample - loss: 2329243.0000
Epoch 402/500
5/5 [==============================] - 0s 277us/sample - loss: 2301521.0000
Epoch 403/500
5/5 [==============================] - 0s 179us/sample - loss: 2274125.5000
Epoch 404/500
5/5 [==============================] - 0s 202us/sample - loss: 2247065.7500
Epoch 405/500
5/5 [==============================] - 0s 182us/sample - loss: 2220318.7500
Epoch 406/500
5/5 [==============================] - 0s 184us/sample - loss: 2193892.7500
Epoch 407/500
5/5 [==============================] - 0s 265us/sample - loss: 2167787.0000
Epoch 408/500
5/5 [==============================] - 0s 226us/sample - loss: 2141992.2500
Epoch 409/500
5/5 [==============================] - 0s 204us/sample - loss: 2116495.2500
Epoch 410/500
5/5 [==============================] - 0s 289us/sample - loss: 2091303.7500
Epoch 411/500
5/5 [==============================] - 0s 406us/sample - loss: 2066409.2500
Epoch 412/500
5/5 [==============================] - 0s 1ms/sample - loss: 2041815.7500
Epoch 413/500
5/5 [==============================] - 0s 296us/sample - loss: 2017513.6250
Epoch 414/500
5/5 [==============================] - 0s 274us/sample - loss: 1993509.2500
Epoch 415/500
5/5 [==============================] - 0s 264us/sample - loss: 1969776.7500
Epoch 416/500
5/5 [==============================] - 0s 234us/sample - loss: 1946330.7500
Epoch 417/500
5/5 [==============================] - 0s 204us/sample - loss: 1923171.7500
Epoch 418/500
5/5 [==============================] - 0s 247us/sample - loss: 1900283.3750
Epoch 419/500
5/5 [==============================] - 0s 205us/sample - loss: 1877663.6250
Epoch 420/500
5/5 [==============================] - 0s 196us/sample - loss: 1855317.0000
Epoch 421/500
5/5 [==============================] - 0s 202us/sample - loss: 1833231.6250
Epoch 422/500
5/5 [==============================] - 0s 145us/sample - loss: 1811417.2500
Epoch 423/500
5/5 [==============================] - 0s 164us/sample - loss: 1789855.2500
Epoch 424/500
5/5 [==============================] - 0s 171us/sample - loss: 1768555.2500
Epoch 425/500
5/5 [==============================] - 0s 210us/sample - loss: 1747505.6250
Epoch 426/500
5/5 [==============================] - 0s 174us/sample - loss: 1726704.2500
Epoch 427/500
5/5 [==============================] - 0s 187us/sample - loss: 1706153.6250
Epoch 428/500
5/5 [==============================] - 0s 151us/sample - loss: 1685849.3750
Epoch 429/500
5/5 [==============================] - 0s 216us/sample - loss: 1665782.5000
Epoch 430/500
5/5 [==============================] - 0s 158us/sample - loss: 1645958.7500
Epoch 431/500
5/5 [==============================] - 0s 164us/sample - loss: 1626365.2500
Epoch 432/500
5/5 [==============================] - 0s 182us/sample - loss: 1607017.6250
Epoch 433/500
5/5 [==============================] - 0s 165us/sample - loss: 1587884.2500
Epoch 434/500
5/5 [==============================] - 0s 172us/sample - loss: 1568979.7500
Epoch 435/500
5/5 [==============================] - 0s 221us/sample - loss: 1550314.3750
Epoch 436/500
5/5 [==============================] - 0s 196us/sample - loss: 1531859.8750
Epoch 437/500
5/5 [==============================] - 0s 203us/sample - loss: 1513623.3750
Epoch 438/500
5/5 [==============================] - 0s 454us/sample - loss: 1495607.3750
Epoch 439/500
5/5 [==============================] - 0s 312us/sample - loss: 1477810.2500
Epoch 440/500
5/5 [==============================] - 0s 153us/sample - loss: 1460217.3750
Epoch 441/500
5/5 [==============================] - 0s 155us/sample - loss: 1442847.5000
Epoch 442/500
5/5 [==============================] - 0s 183us/sample - loss: 1425671.5000
Epoch 443/500
5/5 [==============================] - 0s 151us/sample - loss: 1408708.7500
Epoch 444/500
5/5 [==============================] - 0s 144us/sample - loss: 1391934.1250
Epoch 445/500
5/5 [==============================] - 0s 163us/sample - loss: 1375376.5000
Epoch 446/500
5/5 [==============================] - 0s 206us/sample - loss: 1359001.1250
Epoch 447/500
5/5 [==============================] - 0s 165us/sample - loss: 1342833.6250
Epoch 448/500
5/5 [==============================] - 0s 166us/sample - loss: 1326841.6250
Epoch 449/500
5/5 [==============================] - 0s 196us/sample - loss: 1311051.2500
Epoch 450/500
5/5 [==============================] - 0s 176us/sample - loss: 1295452.3750
Epoch 451/500
5/5 [==============================] - 0s 206us/sample - loss: 1280034.2500
Epoch 452/500
5/5 [==============================] - 0s 153us/sample - loss: 1264795.6250
Epoch 453/500
5/5 [==============================] - 0s 198us/sample - loss: 1249744.3750
Epoch 454/500
5/5 [==============================] - 0s 190us/sample - loss: 1234870.7500
Epoch 455/500
5/5 [==============================] - 0s 218us/sample - loss: 1220170.7500
Epoch 456/500
5/5 [==============================] - 0s 168us/sample - loss: 1205651.7500
Epoch 457/500
5/5 [==============================] - 0s 281us/sample - loss: 1191298.3750
Epoch 458/500
5/5 [==============================] - 0s 168us/sample - loss: 1177125.2500
Epoch 459/500
5/5 [==============================] - 0s 170us/sample - loss: 1163114.2500
Epoch 460/500
5/5 [==============================] - 0s 167us/sample - loss: 1149271.7500
Epoch 461/500
5/5 [==============================] - 0s 145us/sample - loss: 1135588.8750
Epoch 462/500
5/5 [==============================] - 0s 147us/sample - loss: 1122076.2500
Epoch 463/500
5/5 [==============================] - 0s 212us/sample - loss: 1108716.3750
Epoch 464/500
5/5 [==============================] - 0s 229us/sample - loss: 1095523.2500
Epoch 465/500
5/5 [==============================] - 0s 169us/sample - loss: 1082479.3750
Epoch 466/500
5/5 [==============================] - 0s 259us/sample - loss: 1069597.6250
Epoch 467/500
5/5 [==============================] - 0s 156us/sample - loss: 1056864.1250
Epoch 468/500
5/5 [==============================] - 0s 160us/sample - loss: 1044289.3750
Epoch 469/500
5/5 [==============================] - 0s 168us/sample - loss: 1031862.8750
Epoch 470/500
5/5 [==============================] - 0s 208us/sample - loss: 1019577.3125
Epoch 471/500
5/5 [==============================] - 0s 347us/sample - loss: 1007440.5000
Epoch 472/500
5/5 [==============================] - 0s 277us/sample - loss: 995457.1250
Epoch 473/500
5/5 [==============================] - 0s 200us/sample - loss: 983608.3750
Epoch 474/500
5/5 [==============================] - 0s 167us/sample - loss: 971899.3750
Epoch 475/500
5/5 [==============================] - 0s 211us/sample - loss: 960332.1250
Epoch 476/500
5/5 [==============================] - 0s 175us/sample - loss: 948908.3125
Epoch 477/500
5/5 [==============================] - 0s 145us/sample - loss: 937609.3125
Epoch 478/500
5/5 [==============================] - 0s 182us/sample - loss: 926449.5000
Epoch 479/500
5/5 [==============================] - 0s 172us/sample - loss: 915424.8750
Epoch 480/500
5/5 [==============================] - 0s 200us/sample - loss: 904531.8750
Epoch 481/500
5/5 [==============================] - 0s 223us/sample - loss: 893763.3750
Epoch 482/500
5/5 [==============================] - 0s 174us/sample - loss: 883129.1250
Epoch 483/500
5/5 [==============================] - 0s 174us/sample - loss: 872623.1875
Epoch 484/500
5/5 [==============================] - 0s 177us/sample - loss: 862231.3125
Epoch 485/500
5/5 [==============================] - 0s 195us/sample - loss: 851970.1250
Epoch 486/500
5/5 [==============================] - 0s 191us/sample - loss: 841829.5000
Epoch 487/500
5/5 [==============================] - 0s 238us/sample - loss: 831806.6250
Epoch 488/500
5/5 [==============================] - 0s 214us/sample - loss: 821909.1250
Epoch 489/500
5/5 [==============================] - 0s 180us/sample - loss: 812132.3125
Epoch 490/500
5/5 [==============================] - 0s 194us/sample - loss: 802462.4375
Epoch 491/500
5/5 [==============================] - 0s 165us/sample - loss: 792910.1875
Epoch 492/500
5/5 [==============================] - 0s 175us/sample - loss: 783477.3125
Epoch 493/500
5/5 [==============================] - 0s 157us/sample - loss: 774152.0625
Epoch 494/500
5/5 [==============================] - 0s 196us/sample - loss: 764935.0000
Epoch 495/500
5/5 [==============================] - 0s 164us/sample - loss: 755832.1875
Epoch 496/500
5/5 [==============================] - 0s 173us/sample - loss: 746836.5000
Epoch 497/500
5/5 [==============================] - 0s 338us/sample - loss: 737948.8125
Epoch 498/500
5/5 [==============================] - 0s 317us/sample - loss: 729166.3750
Epoch 499/500
5/5 [==============================] - 0s 288us/sample - loss: 720482.7500
Epoch 500/500
5/5 [==============================] - 0s 226us/sample - loss: 711911.8750
[[351600.38]]
(compare with the expected 350000.0)

Notes Related to Week 2

import tensorflow as tf
#print(tf.__version__)
mnist = tf.keras.datasets.fashion_mnist
#help(mnist)
(training_images, training_labels), (test_images, test_labels) = mnist.load_data()
Downloading data from https://storage.googleapis.com/tensorflow/tf-keras-datasets/train-labels-idx1-ubyte.gz
32768/29515 [=================================] - 0s 0us/step
Downloading data from https://storage.googleapis.com/tensorflow/tf-keras-datasets/train-images-idx3-ubyte.gz
26427392/26421880 [==============================] - 1s 0us/step
Downloading data from https://storage.googleapis.com/tensorflow/tf-keras-datasets/t10k-labels-idx1-ubyte.gz
8192/5148 [===============================================] - 0s 0us/step
Downloading data from https://storage.googleapis.com/tensorflow/tf-keras-datasets/t10k-images-idx3-ubyte.gz
4423680/4422102 [==============================] - 0s 0us/step
import matplotlib.pyplot as plt
plt.imshow(training_images[0])
print(training_labels[0])
print(training_images[0])
9
[[  0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0
    0   0   0   0   0   0   0   0   0   0]
 [  0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0
    0   0   0   0   0   0   0   0   0   0]
 [  0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0
    0   0   0   0   0   0   0   0   0   0]
 [  0   0   0   0   0   0   0   0   0   0   0   0   1   0   0  13  73   0
    0   1   4   0   0   0   0   1   1   0]
 [  0   0   0   0   0   0   0   0   0   0   0   0   3   0  36 136 127  62
   54   0   0   0   1   3   4   0   0   3]
 [  0   0   0   0   0   0   0   0   0   0   0   0   6   0 102 204 176 134
  144 123  23   0   0   0   0  12  10   0]
 [  0   0   0   0   0   0   0   0   0   0   0   0   0   0 155 236 207 178
  107 156 161 109  64  23  77 130  72  15]
 [  0   0   0   0   0   0   0   0   0   0   0   1   0  69 207 223 218 216
  216 163 127 121 122 146 141  88 172  66]
 [  0   0   0   0   0   0   0   0   0   1   1   1   0 200 232 232 233 229
  223 223 215 213 164 127 123 196 229   0]
 [  0   0   0   0   0   0   0   0   0   0   0   0   0 183 225 216 223 228
  235 227 224 222 224 221 223 245 173   0]
 [  0   0   0   0   0   0   0   0   0   0   0   0   0 193 228 218 213 198
  180 212 210 211 213 223 220 243 202   0]
 [  0   0   0   0   0   0   0   0   0   1   3   0  12 219 220 212 218 192
  169 227 208 218 224 212 226 197 209  52]
 [  0   0   0   0   0   0   0   0   0   0   6   0  99 244 222 220 218 203
  198 221 215 213 222 220 245 119 167  56]
 [  0   0   0   0   0   0   0   0   0   4   0   0  55 236 228 230 228 240
  232 213 218 223 234 217 217 209  92   0]
 [  0   0   1   4   6   7   2   0   0   0   0   0 237 226 217 223 222 219
  222 221 216 223 229 215 218 255  77   0]
 [  0   3   0   0   0   0   0   0   0  62 145 204 228 207 213 221 218 208
  211 218 224 223 219 215 224 244 159   0]
 [  0   0   0   0  18  44  82 107 189 228 220 222 217 226 200 205 211 230
  224 234 176 188 250 248 233 238 215   0]
 [  0  57 187 208 224 221 224 208 204 214 208 209 200 159 245 193 206 223
  255 255 221 234 221 211 220 232 246   0]
 [  3 202 228 224 221 211 211 214 205 205 205 220 240  80 150 255 229 221
  188 154 191 210 204 209 222 228 225   0]
 [ 98 233 198 210 222 229 229 234 249 220 194 215 217 241  65  73 106 117
  168 219 221 215 217 223 223 224 229  29]
 [ 75 204 212 204 193 205 211 225 216 185 197 206 198 213 240 195 227 245
  239 223 218 212 209 222 220 221 230  67]
 [ 48 203 183 194 213 197 185 190 194 192 202 214 219 221 220 236 225 216
  199 206 186 181 177 172 181 205 206 115]
 [  0 122 219 193 179 171 183 196 204 210 213 207 211 210 200 196 194 191
  195 191 198 192 176 156 167 177 210  92]
 [  0   0  74 189 212 191 175 172 175 181 185 188 189 188 193 198 204 209
  210 210 211 188 188 194 192 216 170   0]
 [  2   0   0   0  66 200 222 237 239 242 246 243 244 221 220 193 191 179
  182 182 181 176 166 168  99  58   0   0]
 [  0   0   0   0   0   0   0  40  61  44  72  41  35   0   0   0   0   0
    0   0   0   0   0   0   0   0   0   0]
 [  0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0
    0   0   0   0   0   0   0   0   0   0]
 [  0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0
    0   0   0   0   0   0   0   0   0   0]]
training_images  = training_images / 255.0
test_images = test_images / 255.0
model = tf.keras.models.Sequential([tf.keras.layers.Flatten(), 
                                    tf.keras.layers.Dense(128, activation=tf.nn.relu), 
                                    tf.keras.layers.Dense(10, activation=tf.nn.softmax)])

Side Notes

This section document various thoughts that occured while following this course.

The course explain how number label are used as a way to dodge biases. While the intention is fine and this approach does provide a relevant step, this raise a far deeper epistemological problem. This is not actually a way to construct a bias-free representation. Rather it tries to smooth categories used in different culture under a single digital category. The resulting category will then map to something different, which is not immersed in the same semantic network. Actually, even acceptance of numbering is a cultural bias. Of course, this is acceptable as an assumed bias that is selected for its known efficiency at leading to some positive results.

Related Resources

Glossary

This glossary aim at bring quick definition for terms related to TensorFlow use

  • activation function
  • Adaptive Gradient Algorithm (AdaGrad):
  • adaptive moment estimation (ADAM): an algorithm for first-order gradient-based optimization ofstochastic objective functions, based on adaptive estimates of lower-order mo-ments.
  • algorithm, cycloreduction: A finite unambiguous specification of how to solve a class of problems using a cyclic mechanism to describe undefinetely large amount of resources.
  • bias:
  • binary classification problem (BCP):
  • Computer vision: an interdisciplinary scientific field that deals with how computers can be made to gain high-level understanding from digital images or videos. From the perspective of engineering, it seeks to automate tasks that the human visual system can do.
  • confinet: confine network
  • convergence: The process of going closer to the correct answer
  • convonlution: a process transforming a input by application of a filter taking a frame of elements as basic unit and acting on all elements under this group/filter couple
  • convolutional neural networks (CNN), convnet:
  • Deep Neural Network (DNN)
  • Deep Learning (DL):
  • dense: a layer of connected neurons in TensorFlow's keras
  • density:
  • epoch :
  • Estimated Time of Arrival (ETA):
  • Fashion MNIST: An MIT licensed data bank of 70 thousand images, etach 28 by 28 greyscales pixels, spread across 10 different items of clothing
  • feature map:
  • Flatten a structure: take a multidimensional data structure and put all elements in a single dimensional sequence
  • Google collab: the jupyter derivated solution hosted by Google
  • Hello World:
  • Hierarchical Temporal Memory (HTM)
  • input shape:
  • Jupyter: web-based execution environment that supports notebook editing in several dozen programming languages
  • keras: an API for TensorFlow
  • keras: a set of Sequential layers in TensorFlow
  • label: metadata that indicate some descriptive relationship between dataset, for example pictures and texts that describes what it will commonly be suggested as depicted
  • learning rate (LR):
  • loss: function that measures the guessed answers against the known correct answers and measures its accuracy
  • Machine Learning (ML): a programming paradigm that take Answers and Data as input and generate rules
  • mean squared error (MSE):
  • neural network:
  • neuron:
  • normalization: mapping the input values into a range that ease further processing, usually [-1;1] or [0;1]
  • numpy:
  • optimizer: function that generate guesses aiming at minimized loss, possibly taking into account previous guesses and their matching loss
  • overfitting
  • paradigm:
  • polling: a filter
  • Python Imaging Library (PIL)
  • recognition
  • relu: an activation function that provides the greatest between zero and the argument. So in practice it the next layer in the network received the an input set where negative values have been nullified.
  • Root Mean Square Propagation (RMSProp):
  • rules:
  • scaling
  • scaffolding (software): Per analogy, a set of software components that enable to get the job done, focusing on the relevant tasks rather than being distracted on lower level requirements
  • scenarios: general description of a problem that enable to select apropriate loss and optimizer functions
  • Sequential layers:
  • sigmoid:
  • Softmax: an activation function
  • stochastic gradient descent (SGD):
  • TensorFlow:
  • training: phase during which the cycloreduction of the problem happen