diff --git a/.ipynb_checkpoints/Lab1-Hello-ML-World-checkpoint.ipynb b/.ipynb_checkpoints/Lab1-Hello-ML-World-checkpoint.ipynb new file mode 100644 index 0000000..7dd46e5 --- /dev/null +++ b/.ipynb_checkpoints/Lab1-Hello-ML-World-checkpoint.ipynb @@ -0,0 +1,1309 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": { + "colab_type": "text", + "id": "ZIAkIlfmCe1B" + }, + "source": [ + "# The Hello World of Deep Learning with Neural Networks" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "colab_type": "text", + "id": "fA93WUy1zzWf" + }, + "source": [ + "Like every first app you should start with something super simple that shows the overall scaffolding for how your code works. \n", + "\n", + "In the case of creating neural networks, the sample I like to use is one where it learns the relationship between two numbers. So, for example, if you were writing code for a function like this, you already know the 'rules' -- \n", + "\n", + "\n", + "```\n", + "float my_function(float x){\n", + " float y = (3 * x) + 1;\n", + " return y;\n", + "}\n", + "```\n", + "\n", + "So how would you train a neural network to do the equivalent task? Using data! By feeding it with a set of Xs, and a set of Ys, it should be able to figure out the relationship between them. \n", + "\n", + "This is obviously a very different paradigm than what you might be used to, so let's step through it piece by piece.\n" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "colab_type": "text", + "id": "DzbtdRcZDO9B" + }, + "source": [ + "## Imports\n", + "\n", + "Let's start with our imports. Here we are importing TensorFlow and calling it tf for ease of use.\n", + "\n", + "We then import a library called numpy, which helps us to represent our data as lists easily and quickly.\n", + "\n", + "The framework for defining a neural network as a set of Sequential layers is called keras, so we import that too." + ] + }, + { + "cell_type": "code", + "execution_count": 0, + "metadata": { + "colab": {}, + "colab_type": "code", + "id": "X9uIpOS2zx7k" + }, + "outputs": [], + "source": [ + "import tensorflow as tf\n", + "import numpy as np\n", + "from tensorflow import keras" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "colab_type": "text", + "id": "wwJGmDrQ0EoB" + }, + "source": [ + "## Define and Compile the Neural Network\n", + "\n", + "Next we will create the simplest possible neural network. It has 1 layer, and that layer has 1 neuron, and the input shape to it is just 1 value." + ] + }, + { + "cell_type": "code", + "execution_count": 0, + "metadata": { + "colab": {}, + "colab_type": "code", + "id": "kQFAr_xo0M4T" + }, + "outputs": [], + "source": [ + "model = tf.keras.Sequential([keras.layers.Dense(units=1, input_shape=[1])])" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "colab_type": "text", + "id": "KhjZjZ-c0Ok9" + }, + "source": [ + "Now we compile our Neural Network. When we do so, we have to specify 2 functions, a loss and an optimizer.\n", + "\n", + "If you've seen lots of math for machine learning, here's where it's usually used, but in this case it's nicely encapsulated in functions for you. But what happens here -- let's explain...\n", + "\n", + "We know that in our function, the relationship between the numbers is y=3x+1. \n", + "\n", + "When the computer is trying to 'learn' that, it makes a guess...maybe y=10x+10. The LOSS function measures the guessed answers against the known correct answers and measures how well or how badly it did.\n", + "\n", + "It then uses the OPTIMIZER function to make another guess. Based on how the loss function went, it will try to minimize the loss. At that point maybe it will come up with somehting like y=5x+5, which, while still pretty bad, is closer to the correct result (i.e. the loss is lower)\n", + "\n", + "It will repeat this for the number of EPOCHS which you will see shortly. But first, here's how we tell it to use 'MEAN SQUARED ERROR' for the loss and 'STOCHASTIC GRADIENT DESCENT' for the optimizer. You don't need to understand the math for these yet, but you can see that they work! :)\n", + "\n", + "Over time you will learn the different and appropriate loss and optimizer functions for different scenarios. \n" + ] + }, + { + "cell_type": "code", + "execution_count": 0, + "metadata": { + "colab": {}, + "colab_type": "code", + "id": "m8YQN1H41L-Y" + }, + "outputs": [], + "source": [ + "model.compile(optimizer='sgd', loss='mean_squared_error')" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "colab_type": "text", + "id": "5QyOUhFw1OUX" + }, + "source": [ + "## Providing the Data\n", + "\n", + "Next up we'll feed in some data. In this case we are taking 6 xs and 6ys. You can see that the relationship between these is that y=3x-1, so where x = -1, y=-2 etc. etc. \n", + "\n", + "A python library called 'Numpy' provides lots of array type data structures that are a defacto standard way of doing it. We declare that we want to use these by specifying the values asn an np.array[]" + ] + }, + { + "cell_type": "code", + "execution_count": 0, + "metadata": { + "colab": {}, + "colab_type": "code", + "id": "4Dxk4q-jzEy4" + }, + "outputs": [], + "source": [ + "xs = np.array([-1.0, 0.0, 1.0, 2.0, 3.0, 4.0], dtype=float)\n", + "ys = np.array([-2.0, 1.0, 4.0, 7.0, 10.0, 13.0], dtype=float)" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "colab_type": "text", + "id": "n_YcWRElnM_b" + }, + "source": [ + "# Training the Neural Network" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "colab_type": "text", + "id": "c-Jk4dG91dvD" + }, + "source": [ + "The process of training the neural network, where it 'learns' the relationship between the Xs and Ys is in the **model.fit** call. This is where it will go through the loop we spoke about above, making a guess, measuring how good or bad it is (aka the loss), using the opimizer to make another guess etc. It will do it for the number of epochs you specify. When you run this code, you'll see the loss on the right hand side." + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "colab": { + "height": 17034 + }, + "colab_type": "code", + "executionInfo": { + "elapsed": 1575, + "status": "ok", + "timestamp": 1552616831242, + "user": { + "displayName": "Laurence Moroney", + "photoUrl": "https://lh3.googleusercontent.com/-RcxktLY-TBk/AAAAAAAAAAI/AAAAAAAAABY/b4V4dTIqmPI/s64/photo.jpg", + "userId": "06401446828348966425" + }, + "user_tz": -540 + }, + "id": "lpRrl7WK10Pq", + "outputId": "61cb92f9-ad29-418d-ce9e-4c616b3b963c" + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Epoch 1/500\n", + "6/6 [==============================] - 0s 16ms/step - loss: 57.4875\n", + "Epoch 2/500\n", + "6/6 [==============================] - 0s 173us/step - loss: 45.2285\n", + "Epoch 3/500\n", + "6/6 [==============================] - 0s 171us/step - loss: 35.5836\n", + "Epoch 4/500\n", + "6/6 [==============================] - 0s 195us/step - loss: 27.9955\n", + "Epoch 5/500\n", + "6/6 [==============================] - 0s 157us/step - loss: 22.0256\n", + "Epoch 6/500\n", + "6/6 [==============================] - 0s 132us/step - loss: 17.3287\n", + "Epoch 7/500\n", + "6/6 [==============================] - 0s 134us/step - loss: 13.6334\n", + "Epoch 8/500\n", + "6/6 [==============================] - 0s 129us/step - loss: 10.7262\n", + "Epoch 9/500\n", + "6/6 [==============================] - 0s 154us/step - loss: 8.4389\n", + "Epoch 10/500\n", + "6/6 [==============================] - 0s 135us/step - loss: 6.6393\n", + "Epoch 11/500\n", + "6/6 [==============================] - 0s 115us/step - loss: 5.2235\n", + "Epoch 12/500\n", + "6/6 [==============================] - 0s 129us/step - loss: 4.1097\n", + "Epoch 13/500\n", + "6/6 [==============================] - 0s 152us/step - loss: 3.2333\n", + "Epoch 14/500\n", + "6/6 [==============================] - 0s 113us/step - loss: 2.5439\n", + "Epoch 15/500\n", + "6/6 [==============================] - 0s 124us/step - loss: 2.0014\n", + "Epoch 16/500\n", + "6/6 [==============================] - 0s 135us/step - loss: 1.5747\n", + "Epoch 17/500\n", + "6/6 [==============================] - 0s 137us/step - loss: 1.2389\n", + "Epoch 18/500\n", + "6/6 [==============================] - 0s 149us/step - loss: 0.9747\n", + "Epoch 19/500\n", + "6/6 [==============================] - 0s 142us/step - loss: 0.7669\n", + "Epoch 20/500\n", + "6/6 [==============================] - 0s 139us/step - loss: 0.6034\n", + "Epoch 21/500\n", + "6/6 [==============================] - 0s 139us/step - loss: 0.4748\n", + "Epoch 22/500\n", + "6/6 [==============================] - 0s 126us/step - loss: 0.3736\n", + "Epoch 23/500\n", + "6/6 [==============================] - 0s 118us/step - loss: 0.2939\n", + "Epoch 24/500\n", + "6/6 [==============================] - 0s 111us/step - loss: 0.2313\n", + "Epoch 25/500\n", + "6/6 [==============================] - 0s 142us/step - loss: 0.1820\n", + "Epoch 26/500\n", + "6/6 [==============================] - 0s 173us/step - loss: 0.1432\n", + "Epoch 27/500\n", + "6/6 [==============================] - 0s 154us/step - loss: 0.1127\n", + "Epoch 28/500\n", + "6/6 [==============================] - 0s 164us/step - loss: 0.0887\n", + "Epoch 29/500\n", + "6/6 [==============================] - 0s 149us/step - loss: 0.0698\n", + "Epoch 30/500\n", + "6/6 [==============================] - 0s 126us/step - loss: 0.0549\n", + "Epoch 31/500\n", + "6/6 [==============================] - 0s 114us/step - loss: 0.0433\n", + "Epoch 32/500\n", + "6/6 [==============================] - 0s 125us/step - loss: 0.0341\n", + "Epoch 33/500\n", + "6/6 [==============================] - 0s 131us/step - loss: 0.0268\n", + "Epoch 34/500\n", + "6/6 [==============================] - 0s 117us/step - loss: 0.0211\n", + "Epoch 35/500\n", + "6/6 [==============================] - 0s 121us/step - loss: 0.0166\n", + "Epoch 36/500\n", + "6/6 [==============================] - 0s 118us/step - loss: 0.0131\n", + "Epoch 37/500\n", + "6/6 [==============================] - 0s 118us/step - loss: 0.0103\n", + "Epoch 38/500\n", + "6/6 [==============================] - 0s 119us/step - loss: 0.0082\n", + "Epoch 39/500\n", + "6/6 [==============================] - 0s 117us/step - loss: 0.0064\n", + "Epoch 40/500\n", + "6/6 [==============================] - 0s 129us/step - loss: 0.0051\n", + "Epoch 41/500\n", + "6/6 [==============================] - 0s 109us/step - loss: 0.0040\n", + "Epoch 42/500\n", + "6/6 [==============================] - 0s 116us/step - loss: 0.0032\n", + "Epoch 43/500\n", + "6/6 [==============================] - 0s 107us/step - loss: 0.0025\n", + "Epoch 44/500\n", + "6/6 [==============================] - 0s 112us/step - loss: 0.0020\n", + "Epoch 45/500\n", + "6/6 [==============================] - 0s 122us/step - loss: 0.0016\n", + "Epoch 46/500\n", + "6/6 [==============================] - 0s 143us/step - loss: 0.0013\n", + "Epoch 47/500\n", + "6/6 [==============================] - 0s 136us/step - loss: 0.0010\n", + "Epoch 48/500\n", + "6/6 [==============================] - 0s 116us/step - loss: 8.2458e-04\n", + "Epoch 49/500\n", + "6/6 [==============================] - 0s 134us/step - loss: 6.6677e-04\n", + "Epoch 50/500\n", + "6/6 [==============================] - 0s 114us/step - loss: 5.4223e-04\n", + "Epoch 51/500\n", + "6/6 [==============================] - 0s 152us/step - loss: 4.4389e-04\n", + "Epoch 52/500\n", + "6/6 [==============================] - 0s 131us/step - loss: 3.6617e-04\n", + "Epoch 53/500\n", + "6/6 [==============================] - 0s 162us/step - loss: 3.0467e-04\n", + "Epoch 54/500\n", + "6/6 [==============================] - 0s 135us/step - loss: 2.5594e-04\n", + "Epoch 55/500\n", + "6/6 [==============================] - 0s 124us/step - loss: 2.1727e-04\n", + "Epoch 56/500\n", + "6/6 [==============================] - 0s 116us/step - loss: 1.8652e-04\n", + "Epoch 57/500\n", + "6/6 [==============================] - 0s 112us/step - loss: 1.6201e-04\n", + "Epoch 58/500\n", + "6/6 [==============================] - 0s 129us/step - loss: 1.4241e-04\n", + "Epoch 59/500\n", + "6/6 [==============================] - 0s 127us/step - loss: 1.2668e-04\n", + "Epoch 60/500\n", + "6/6 [==============================] - 0s 120us/step - loss: 1.1401e-04\n", + "Epoch 61/500\n", + "6/6 [==============================] - 0s 132us/step - loss: 1.0375e-04\n", + "Epoch 62/500\n", + "6/6 [==============================] - 0s 176us/step - loss: 9.5379e-05\n", + "Epoch 63/500\n", + "6/6 [==============================] - 0s 124us/step - loss: 8.8515e-05\n", + "Epoch 64/500\n", + "6/6 [==============================] - 0s 110us/step - loss: 8.2838e-05\n", + "Epoch 65/500\n", + "6/6 [==============================] - 0s 110us/step - loss: 7.8103e-05\n", + "Epoch 66/500\n", + "6/6 [==============================] - 0s 131us/step - loss: 7.4109e-05\n", + "Epoch 67/500\n", + "6/6 [==============================] - 0s 140us/step - loss: 7.0707e-05\n", + "Epoch 68/500\n", + "6/6 [==============================] - 0s 133us/step - loss: 6.7776e-05\n", + "Epoch 69/500\n", + "6/6 [==============================] - 0s 143us/step - loss: 6.5221e-05\n", + "Epoch 70/500\n", + "6/6 [==============================] - 0s 138us/step - loss: 6.2964e-05\n", + "Epoch 71/500\n", + "6/6 [==============================] - 0s 130us/step - loss: 6.0952e-05\n", + "Epoch 72/500\n", + "6/6 [==============================] - 0s 152us/step - loss: 5.9133e-05\n", + "Epoch 73/500\n", + "6/6 [==============================] - 0s 126us/step - loss: 5.7474e-05\n", + "Epoch 74/500\n", + "6/6 [==============================] - 0s 141us/step - loss: 5.5941e-05\n", + "Epoch 75/500\n", + "6/6 [==============================] - 0s 120us/step - loss: 5.4516e-05\n", + "Epoch 76/500\n", + "6/6 [==============================] - 0s 101us/step - loss: 5.3179e-05\n", + "Epoch 77/500\n", + "6/6 [==============================] - 0s 123us/step - loss: 5.1917e-05\n", + "Epoch 78/500\n", + "6/6 [==============================] - 0s 157us/step - loss: 5.0715e-05\n", + "Epoch 79/500\n", + "6/6 [==============================] - 0s 152us/step - loss: 4.9569e-05\n", + "Epoch 80/500\n", + "6/6 [==============================] - 0s 148us/step - loss: 4.8467e-05\n", + "Epoch 81/500\n", + "6/6 [==============================] - 0s 147us/step - loss: 4.7406e-05\n", + "Epoch 82/500\n", + "6/6 [==============================] - 0s 122us/step - loss: 4.6381e-05\n", + "Epoch 83/500\n", + "6/6 [==============================] - 0s 144us/step - loss: 4.5388e-05\n", + "Epoch 84/500\n", + "6/6 [==============================] - 0s 155us/step - loss: 4.4423e-05\n", + "Epoch 85/500\n", + "6/6 [==============================] - 0s 124us/step - loss: 4.3485e-05\n", + "Epoch 86/500\n", + "6/6 [==============================] - 0s 133us/step - loss: 4.2572e-05\n", + "Epoch 87/500\n", + "6/6 [==============================] - 0s 122us/step - loss: 4.1682e-05\n", + "Epoch 88/500\n", + "6/6 [==============================] - 0s 107us/step - loss: 4.0814e-05\n", + "Epoch 89/500\n", + "6/6 [==============================] - 0s 125us/step - loss: 3.9965e-05\n", + "Epoch 90/500\n", + "6/6 [==============================] - 0s 118us/step - loss: 3.9137e-05\n", + "Epoch 91/500\n", + "6/6 [==============================] - 0s 112us/step - loss: 3.8327e-05\n", + "Epoch 92/500\n", + "6/6 [==============================] - 0s 129us/step - loss: 3.7535e-05\n", + "Epoch 93/500\n", + "6/6 [==============================] - 0s 128us/step - loss: 3.6761e-05\n", + "Epoch 94/500\n", + "6/6 [==============================] - 0s 130us/step - loss: 3.6002e-05\n", + "Epoch 95/500\n", + "6/6 [==============================] - 0s 141us/step - loss: 3.5261e-05\n", + "Epoch 96/500\n", + "6/6 [==============================] - 0s 126us/step - loss: 3.4534e-05\n", + "Epoch 97/500\n", + "6/6 [==============================] - 0s 151us/step - loss: 3.3825e-05\n", + "Epoch 98/500\n", + "6/6 [==============================] - 0s 161us/step - loss: 3.3128e-05\n", + "Epoch 99/500\n", + "6/6 [==============================] - 0s 126us/step - loss: 3.2447e-05\n", + "Epoch 100/500\n", + "6/6 [==============================] - 0s 175us/step - loss: 3.1780e-05\n", + "Epoch 101/500\n", + "6/6 [==============================] - 0s 166us/step - loss: 3.1126e-05\n", + "Epoch 102/500\n", + "6/6 [==============================] - 0s 148us/step - loss: 3.0486e-05\n", + "Epoch 103/500\n", + "6/6 [==============================] - 0s 121us/step - loss: 2.9860e-05\n", + "Epoch 104/500\n", + "6/6 [==============================] - 0s 127us/step - loss: 2.9246e-05\n", + "Epoch 105/500\n", + "6/6 [==============================] - 0s 135us/step - loss: 2.8645e-05\n", + "Epoch 106/500\n", + "6/6 [==============================] - 0s 150us/step - loss: 2.8056e-05\n", + "Epoch 107/500\n", + "6/6 [==============================] - 0s 158us/step - loss: 2.7481e-05\n", + "Epoch 108/500\n", + "6/6 [==============================] - 0s 133us/step - loss: 2.6916e-05\n", + "Epoch 109/500\n", + "6/6 [==============================] - 0s 165us/step - loss: 2.6363e-05\n", + "Epoch 110/500\n", + "6/6 [==============================] - 0s 149us/step - loss: 2.5821e-05\n", + "Epoch 111/500\n", + "6/6 [==============================] - 0s 144us/step - loss: 2.5290e-05\n", + "Epoch 112/500\n", + "6/6 [==============================] - 0s 128us/step - loss: 2.4771e-05\n", + "Epoch 113/500\n", + "6/6 [==============================] - 0s 116us/step - loss: 2.4263e-05\n", + "Epoch 114/500\n", + "6/6 [==============================] - 0s 124us/step - loss: 2.3763e-05\n", + "Epoch 115/500\n", + "6/6 [==============================] - 0s 117us/step - loss: 2.3276e-05\n", + "Epoch 116/500\n", + "6/6 [==============================] - 0s 119us/step - loss: 2.2798e-05\n", + "Epoch 117/500\n", + "6/6 [==============================] - 0s 185us/step - loss: 2.2328e-05\n", + "Epoch 118/500\n", + "6/6 [==============================] - 0s 217us/step - loss: 2.1871e-05\n", + "Epoch 119/500\n", + "6/6 [==============================] - 0s 169us/step - loss: 2.1421e-05\n", + "Epoch 120/500\n", + "6/6 [==============================] - 0s 133us/step - loss: 2.0981e-05\n", + "Epoch 121/500\n", + "6/6 [==============================] - 0s 123us/step - loss: 2.0551e-05\n", + "Epoch 122/500\n", + "6/6 [==============================] - 0s 116us/step - loss: 2.0128e-05\n", + "Epoch 123/500\n", + "6/6 [==============================] - 0s 127us/step - loss: 1.9715e-05\n", + "Epoch 124/500\n", + "6/6 [==============================] - 0s 129us/step - loss: 1.9310e-05\n", + "Epoch 125/500\n", + "6/6 [==============================] - 0s 158us/step - loss: 1.8914e-05\n", + "Epoch 126/500\n", + "6/6 [==============================] - 0s 172us/step - loss: 1.8525e-05\n", + "Epoch 127/500\n", + "6/6 [==============================] - 0s 182us/step - loss: 1.8145e-05\n", + "Epoch 128/500\n", + "6/6 [==============================] - 0s 139us/step - loss: 1.7772e-05\n", + "Epoch 129/500\n", + "6/6 [==============================] - 0s 114us/step - loss: 1.7407e-05\n", + "Epoch 130/500\n", + "6/6 [==============================] - 0s 108us/step - loss: 1.7049e-05\n", + "Epoch 131/500\n", + "6/6 [==============================] - 0s 136us/step - loss: 1.6699e-05\n", + "Epoch 132/500\n", + "6/6 [==============================] - 0s 133us/step - loss: 1.6355e-05\n", + "Epoch 133/500\n", + "6/6 [==============================] - 0s 115us/step - loss: 1.6020e-05\n", + "Epoch 134/500\n", + "6/6 [==============================] - 0s 117us/step - loss: 1.5691e-05\n", + "Epoch 135/500\n", + "6/6 [==============================] - 0s 161us/step - loss: 1.5369e-05\n", + "Epoch 136/500\n", + "6/6 [==============================] - 0s 155us/step - loss: 1.5052e-05\n", + "Epoch 137/500\n", + "6/6 [==============================] - 0s 108us/step - loss: 1.4743e-05\n", + "Epoch 138/500\n", + "6/6 [==============================] - 0s 131us/step - loss: 1.4441e-05\n", + "Epoch 139/500\n", + "6/6 [==============================] - 0s 109us/step - loss: 1.4144e-05\n", + "Epoch 140/500\n", + "6/6 [==============================] - 0s 128us/step - loss: 1.3854e-05\n", + "Epoch 141/500\n", + "6/6 [==============================] - 0s 111us/step - loss: 1.3569e-05\n", + "Epoch 142/500\n", + "6/6 [==============================] - 0s 153us/step - loss: 1.3290e-05\n", + "Epoch 143/500\n", + "6/6 [==============================] - 0s 155us/step - loss: 1.3017e-05\n", + "Epoch 144/500\n", + "6/6 [==============================] - 0s 129us/step - loss: 1.2750e-05\n", + "Epoch 145/500\n", + "6/6 [==============================] - 0s 105us/step - loss: 1.2488e-05\n", + "Epoch 146/500\n", + "6/6 [==============================] - 0s 107us/step - loss: 1.2232e-05\n", + "Epoch 147/500\n", + "6/6 [==============================] - 0s 111us/step - loss: 1.1980e-05\n", + "Epoch 148/500\n", + "6/6 [==============================] - 0s 118us/step - loss: 1.1735e-05\n", + "Epoch 149/500\n", + "6/6 [==============================] - 0s 152us/step - loss: 1.1493e-05\n", + "Epoch 150/500\n", + "6/6 [==============================] - 0s 120us/step - loss: 1.1258e-05\n", + "Epoch 151/500\n", + "6/6 [==============================] - 0s 127us/step - loss: 1.1026e-05\n", + "Epoch 152/500\n", + "6/6 [==============================] - 0s 117us/step - loss: 1.0800e-05\n", + "Epoch 153/500\n", + "6/6 [==============================] - 0s 100us/step - loss: 1.0578e-05\n", + "Epoch 154/500\n", + "6/6 [==============================] - 0s 93us/step - loss: 1.0361e-05\n", + "Epoch 155/500\n", + "6/6 [==============================] - 0s 105us/step - loss: 1.0148e-05\n", + "Epoch 156/500\n", + "6/6 [==============================] - 0s 142us/step - loss: 9.9390e-06\n", + "Epoch 157/500\n", + "6/6 [==============================] - 0s 124us/step - loss: 9.7356e-06\n", + "Epoch 158/500\n", + "6/6 [==============================] - 0s 143us/step - loss: 9.5355e-06\n", + "Epoch 159/500\n", + "6/6 [==============================] - 0s 131us/step - loss: 9.3398e-06\n", + "Epoch 160/500\n", + "6/6 [==============================] - 0s 124us/step - loss: 9.1474e-06\n", + "Epoch 161/500\n", + "6/6 [==============================] - 0s 137us/step - loss: 8.9598e-06\n", + "Epoch 162/500\n", + "6/6 [==============================] - 0s 139us/step - loss: 8.7757e-06\n", + "Epoch 163/500\n", + "6/6 [==============================] - 0s 146us/step - loss: 8.5954e-06\n", + "Epoch 164/500\n", + "6/6 [==============================] - 0s 164us/step - loss: 8.4188e-06\n", + "Epoch 165/500\n", + "6/6 [==============================] - 0s 116us/step - loss: 8.2452e-06\n", + "Epoch 166/500\n", + "6/6 [==============================] - 0s 135us/step - loss: 8.0767e-06\n", + "Epoch 167/500\n", + "6/6 [==============================] - 0s 149us/step - loss: 7.9103e-06\n", + "Epoch 168/500\n", + "6/6 [==============================] - 0s 220us/step - loss: 7.7484e-06\n", + "Epoch 169/500\n", + "6/6 [==============================] - 0s 143us/step - loss: 7.5892e-06\n", + "Epoch 170/500\n", + "6/6 [==============================] - 0s 155us/step - loss: 7.4332e-06\n", + "Epoch 171/500\n", + "6/6 [==============================] - 0s 156us/step - loss: 7.2802e-06\n", + "Epoch 172/500\n", + "6/6 [==============================] - 0s 152us/step - loss: 7.1305e-06\n", + "Epoch 173/500\n", + "6/6 [==============================] - 0s 149us/step - loss: 6.9842e-06\n", + "Epoch 174/500\n", + "6/6 [==============================] - 0s 143us/step - loss: 6.8411e-06\n", + "Epoch 175/500\n", + "6/6 [==============================] - 0s 116us/step - loss: 6.7008e-06\n", + "Epoch 176/500\n", + "6/6 [==============================] - 0s 129us/step - loss: 6.5629e-06\n", + "Epoch 177/500\n", + "6/6 [==============================] - 0s 159us/step - loss: 6.4276e-06\n", + "Epoch 178/500\n", + "6/6 [==============================] - 0s 163us/step - loss: 6.2958e-06\n", + "Epoch 179/500\n", + "6/6 [==============================] - 0s 130us/step - loss: 6.1663e-06\n", + "Epoch 180/500\n", + "6/6 [==============================] - 0s 165us/step - loss: 6.0392e-06\n", + "Epoch 181/500\n", + "6/6 [==============================] - 0s 142us/step - loss: 5.9155e-06\n", + "Epoch 182/500\n", + "6/6 [==============================] - 0s 175us/step - loss: 5.7942e-06\n", + "Epoch 183/500\n", + "6/6 [==============================] - 0s 167us/step - loss: 5.6750e-06\n", + "Epoch 184/500\n", + "6/6 [==============================] - 0s 137us/step - loss: 5.5581e-06\n", + "Epoch 185/500\n", + "6/6 [==============================] - 0s 173us/step - loss: 5.4441e-06\n", + "Epoch 186/500\n", + "6/6 [==============================] - 0s 164us/step - loss: 5.3321e-06\n", + "Epoch 187/500\n", + "6/6 [==============================] - 0s 115us/step - loss: 5.2225e-06\n", + "Epoch 188/500\n", + "6/6 [==============================] - 0s 119us/step - loss: 5.1156e-06\n", + "Epoch 189/500\n", + "6/6 [==============================] - 0s 109us/step - loss: 5.0105e-06\n", + "Epoch 190/500\n", + "6/6 [==============================] - 0s 109us/step - loss: 4.9073e-06\n", + "Epoch 191/500\n", + "6/6 [==============================] - 0s 108us/step - loss: 4.8067e-06\n", + "Epoch 192/500\n", + "6/6 [==============================] - 0s 159us/step - loss: 4.7081e-06\n", + "Epoch 193/500\n", + "6/6 [==============================] - 0s 120us/step - loss: 4.6112e-06\n", + "Epoch 194/500\n", + "6/6 [==============================] - 0s 117us/step - loss: 4.5165e-06\n", + "Epoch 195/500\n", + "6/6 [==============================] - 0s 136us/step - loss: 4.4238e-06\n", + "Epoch 196/500\n", + "6/6 [==============================] - 0s 140us/step - loss: 4.3326e-06\n", + "Epoch 197/500\n", + "6/6 [==============================] - 0s 162us/step - loss: 4.2434e-06\n", + "Epoch 198/500\n", + "6/6 [==============================] - 0s 180us/step - loss: 4.1561e-06\n", + "Epoch 199/500\n", + "6/6 [==============================] - 0s 159us/step - loss: 4.0706e-06\n", + "Epoch 200/500\n", + "6/6 [==============================] - 0s 130us/step - loss: 3.9869e-06\n", + "Epoch 201/500\n", + "6/6 [==============================] - 0s 112us/step - loss: 3.9053e-06\n", + "Epoch 202/500\n", + "6/6 [==============================] - 0s 127us/step - loss: 3.8251e-06\n", + "Epoch 203/500\n", + "6/6 [==============================] - 0s 139us/step - loss: 3.7462e-06\n", + "Epoch 204/500\n", + "6/6 [==============================] - 0s 158us/step - loss: 3.6697e-06\n", + "Epoch 205/500\n", + "6/6 [==============================] - 0s 148us/step - loss: 3.5941e-06\n", + "Epoch 206/500\n", + "6/6 [==============================] - 0s 129us/step - loss: 3.5204e-06\n", + "Epoch 207/500\n", + "6/6 [==============================] - 0s 114us/step - loss: 3.4481e-06\n", + "Epoch 208/500\n", + "6/6 [==============================] - 0s 127us/step - loss: 3.3773e-06\n", + "Epoch 209/500\n", + "6/6 [==============================] - 0s 125us/step - loss: 3.3079e-06\n", + "Epoch 210/500\n", + "6/6 [==============================] - 0s 145us/step - loss: 3.2400e-06\n", + "Epoch 211/500\n", + "6/6 [==============================] - 0s 169us/step - loss: 3.1736e-06\n", + "Epoch 212/500\n", + "6/6 [==============================] - 0s 127us/step - loss: 3.1080e-06\n", + "Epoch 213/500\n", + "6/6 [==============================] - 0s 114us/step - loss: 3.0440e-06\n", + "Epoch 214/500\n", + "6/6 [==============================] - 0s 141us/step - loss: 2.9816e-06\n", + "Epoch 215/500\n", + "6/6 [==============================] - 0s 122us/step - loss: 2.9205e-06\n", + "Epoch 216/500\n", + "6/6 [==============================] - 0s 97us/step - loss: 2.8605e-06\n", + "Epoch 217/500\n", + "6/6 [==============================] - 0s 143us/step - loss: 2.8017e-06\n", + "Epoch 218/500\n", + "6/6 [==============================] - 0s 146us/step - loss: 2.7441e-06\n", + "Epoch 219/500\n", + "6/6 [==============================] - 0s 123us/step - loss: 2.6878e-06\n", + "Epoch 220/500\n", + "6/6 [==============================] - 0s 119us/step - loss: 2.6326e-06\n", + "Epoch 221/500\n", + "6/6 [==============================] - 0s 145us/step - loss: 2.5785e-06\n", + "Epoch 222/500\n", + "6/6 [==============================] - 0s 157us/step - loss: 2.5256e-06\n", + "Epoch 223/500\n", + "6/6 [==============================] - 0s 143us/step - loss: 2.4737e-06\n", + "Epoch 224/500\n", + "6/6 [==============================] - 0s 152us/step - loss: 2.4230e-06\n", + "Epoch 225/500\n", + "6/6 [==============================] - 0s 120us/step - loss: 2.3730e-06\n", + "Epoch 226/500\n", + "6/6 [==============================] - 0s 119us/step - loss: 2.3243e-06\n", + "Epoch 227/500\n", + "6/6 [==============================] - 0s 121us/step - loss: 2.2765e-06\n", + "Epoch 228/500\n", + "6/6 [==============================] - 0s 116us/step - loss: 2.2299e-06\n", + "Epoch 229/500\n", + "6/6 [==============================] - 0s 153us/step - loss: 2.1840e-06\n", + "Epoch 230/500\n", + "6/6 [==============================] - 0s 306us/step - loss: 2.1390e-06\n", + "Epoch 231/500\n", + "6/6 [==============================] - 0s 132us/step - loss: 2.0950e-06\n", + "Epoch 232/500\n", + "6/6 [==============================] - 0s 161us/step - loss: 2.0521e-06\n", + "Epoch 233/500\n", + "6/6 [==============================] - 0s 129us/step - loss: 2.0101e-06\n", + "Epoch 234/500\n", + "6/6 [==============================] - 0s 125us/step - loss: 1.9689e-06\n", + "Epoch 235/500\n", + "6/6 [==============================] - 0s 109us/step - loss: 1.9283e-06\n", + "Epoch 236/500\n", + "6/6 [==============================] - 0s 109us/step - loss: 1.8885e-06\n", + "Epoch 237/500\n", + "6/6 [==============================] - 0s 99us/step - loss: 1.8500e-06\n", + "Epoch 238/500\n", + "6/6 [==============================] - 0s 130us/step - loss: 1.8119e-06\n", + "Epoch 239/500\n", + "6/6 [==============================] - 0s 118us/step - loss: 1.7749e-06\n", + "Epoch 240/500\n", + "6/6 [==============================] - 0s 108us/step - loss: 1.7383e-06\n", + "Epoch 241/500\n", + "6/6 [==============================] - 0s 94us/step - loss: 1.7025e-06\n", + "Epoch 242/500\n", + "6/6 [==============================] - 0s 154us/step - loss: 1.6676e-06\n", + "Epoch 243/500\n", + "6/6 [==============================] - 0s 174us/step - loss: 1.6335e-06\n", + "Epoch 244/500\n", + "6/6 [==============================] - 0s 181us/step - loss: 1.5997e-06\n", + "Epoch 245/500\n", + "6/6 [==============================] - 0s 186us/step - loss: 1.5671e-06\n", + "Epoch 246/500\n", + "6/6 [==============================] - 0s 165us/step - loss: 1.5348e-06\n", + "Epoch 247/500\n", + "6/6 [==============================] - 0s 156us/step - loss: 1.5033e-06\n", + "Epoch 248/500\n", + "6/6 [==============================] - 0s 136us/step - loss: 1.4726e-06\n", + "Epoch 249/500\n", + "6/6 [==============================] - 0s 151us/step - loss: 1.4421e-06\n", + "Epoch 250/500\n", + "6/6 [==============================] - 0s 160us/step - loss: 1.4127e-06\n", + "Epoch 251/500\n", + "6/6 [==============================] - 0s 134us/step - loss: 1.3835e-06\n", + "Epoch 252/500\n", + "6/6 [==============================] - 0s 130us/step - loss: 1.3552e-06\n", + "Epoch 253/500\n", + "6/6 [==============================] - 0s 109us/step - loss: 1.3274e-06\n", + "Epoch 254/500\n", + "6/6 [==============================] - 0s 104us/step - loss: 1.3001e-06\n", + "Epoch 255/500\n", + "6/6 [==============================] - 0s 149us/step - loss: 1.2733e-06\n", + "Epoch 256/500\n", + "6/6 [==============================] - 0s 134us/step - loss: 1.2473e-06\n", + "Epoch 257/500\n", + "6/6 [==============================] - 0s 171us/step - loss: 1.2216e-06\n", + "Epoch 258/500\n", + "6/6 [==============================] - 0s 144us/step - loss: 1.1964e-06\n", + "Epoch 259/500\n", + "6/6 [==============================] - 0s 130us/step - loss: 1.1717e-06\n", + "Epoch 260/500\n", + "6/6 [==============================] - 0s 139us/step - loss: 1.1477e-06\n", + "Epoch 261/500\n", + "6/6 [==============================] - 0s 128us/step - loss: 1.1242e-06\n", + "Epoch 262/500\n", + "6/6 [==============================] - 0s 122us/step - loss: 1.1010e-06\n", + "Epoch 263/500\n", + "6/6 [==============================] - 0s 101us/step - loss: 1.0784e-06\n", + "Epoch 264/500\n", + "6/6 [==============================] - 0s 118us/step - loss: 1.0562e-06\n", + "Epoch 265/500\n", + "6/6 [==============================] - 0s 121us/step - loss: 1.0346e-06\n", + "Epoch 266/500\n", + "6/6 [==============================] - 0s 105us/step - loss: 1.0134e-06\n", + "Epoch 267/500\n", + "6/6 [==============================] - 0s 100us/step - loss: 9.9246e-07\n", + "Epoch 268/500\n", + "6/6 [==============================] - 0s 110us/step - loss: 9.7208e-07\n", + "Epoch 269/500\n", + "6/6 [==============================] - 0s 122us/step - loss: 9.5236e-07\n", + "Epoch 270/500\n", + "6/6 [==============================] - 0s 134us/step - loss: 9.3280e-07\n", + "Epoch 271/500\n", + "6/6 [==============================] - 0s 148us/step - loss: 9.1338e-07\n", + "Epoch 272/500\n", + "6/6 [==============================] - 0s 117us/step - loss: 8.9463e-07\n", + "Epoch 273/500\n", + "6/6 [==============================] - 0s 97us/step - loss: 8.7640e-07\n", + "Epoch 274/500\n", + "6/6 [==============================] - 0s 101us/step - loss: 8.5831e-07\n", + "Epoch 275/500\n", + "6/6 [==============================] - 0s 113us/step - loss: 8.4068e-07\n", + "Epoch 276/500\n", + "6/6 [==============================] - 0s 103us/step - loss: 8.2352e-07\n", + "Epoch 277/500\n", + "6/6 [==============================] - 0s 101us/step - loss: 8.0661e-07\n", + "Epoch 278/500\n", + "6/6 [==============================] - 0s 130us/step - loss: 7.9010e-07\n", + "Epoch 279/500\n", + "6/6 [==============================] - 0s 119us/step - loss: 7.7378e-07\n", + "Epoch 280/500\n", + "6/6 [==============================] - 0s 112us/step - loss: 7.5804e-07\n", + "Epoch 281/500\n", + "6/6 [==============================] - 0s 108us/step - loss: 7.4235e-07\n", + "Epoch 282/500\n", + "6/6 [==============================] - 0s 111us/step - loss: 7.2709e-07\n", + "Epoch 283/500\n", + "6/6 [==============================] - 0s 96us/step - loss: 7.1226e-07\n", + "Epoch 284/500\n", + "6/6 [==============================] - 0s 95us/step - loss: 6.9748e-07\n", + "Epoch 285/500\n", + "6/6 [==============================] - 0s 106us/step - loss: 6.8317e-07\n", + "Epoch 286/500\n", + "6/6 [==============================] - 0s 122us/step - loss: 6.6931e-07\n", + "Epoch 287/500\n", + "6/6 [==============================] - 0s 133us/step - loss: 6.5555e-07\n", + "Epoch 288/500\n", + "6/6 [==============================] - 0s 115us/step - loss: 6.4193e-07\n", + "Epoch 289/500\n", + "6/6 [==============================] - 0s 144us/step - loss: 6.2894e-07\n", + "Epoch 290/500\n", + "6/6 [==============================] - 0s 101us/step - loss: 6.1586e-07\n", + "Epoch 291/500\n", + "6/6 [==============================] - 0s 103us/step - loss: 6.0318e-07\n", + "Epoch 292/500\n", + "6/6 [==============================] - 0s 109us/step - loss: 5.9069e-07\n", + "Epoch 293/500\n", + "6/6 [==============================] - 0s 99us/step - loss: 5.7860e-07\n", + "Epoch 294/500\n", + "6/6 [==============================] - 0s 102us/step - loss: 5.6689e-07\n", + "Epoch 295/500\n", + "6/6 [==============================] - 0s 112us/step - loss: 5.5525e-07\n", + "Epoch 296/500\n", + "6/6 [==============================] - 0s 130us/step - loss: 5.4378e-07\n", + "Epoch 297/500\n", + "6/6 [==============================] - 0s 96us/step - loss: 5.3259e-07\n", + "Epoch 298/500\n", + "6/6 [==============================] - 0s 124us/step - loss: 5.2177e-07\n", + "Epoch 299/500\n", + "6/6 [==============================] - 0s 135us/step - loss: 5.1109e-07\n", + "Epoch 300/500\n", + "6/6 [==============================] - 0s 103us/step - loss: 5.0057e-07\n", + "Epoch 301/500\n", + "6/6 [==============================] - 0s 115us/step - loss: 4.9032e-07\n", + "Epoch 302/500\n", + "6/6 [==============================] - 0s 132us/step - loss: 4.8020e-07\n", + "Epoch 303/500\n", + "6/6 [==============================] - 0s 139us/step - loss: 4.7030e-07\n", + "Epoch 304/500\n", + "6/6 [==============================] - 0s 143us/step - loss: 4.6066e-07\n", + "Epoch 305/500\n", + "6/6 [==============================] - 0s 156us/step - loss: 4.5120e-07\n", + "Epoch 306/500\n", + "6/6 [==============================] - 0s 160us/step - loss: 4.4207e-07\n", + "Epoch 307/500\n", + "6/6 [==============================] - 0s 137us/step - loss: 4.3301e-07\n", + "Epoch 308/500\n", + "6/6 [==============================] - 0s 127us/step - loss: 4.2412e-07\n", + "Epoch 309/500\n", + "6/6 [==============================] - 0s 142us/step - loss: 4.1530e-07\n", + "Epoch 310/500\n", + "6/6 [==============================] - 0s 146us/step - loss: 4.0689e-07\n", + "Epoch 311/500\n", + "6/6 [==============================] - 0s 154us/step - loss: 3.9848e-07\n", + "Epoch 312/500\n", + "6/6 [==============================] - 0s 134us/step - loss: 3.9025e-07\n", + "Epoch 313/500\n", + "6/6 [==============================] - 0s 124us/step - loss: 3.8223e-07\n", + "Epoch 314/500\n", + "6/6 [==============================] - 0s 138us/step - loss: 3.7433e-07\n", + "Epoch 315/500\n", + "6/6 [==============================] - 0s 148us/step - loss: 3.6668e-07\n", + "Epoch 316/500\n", + "6/6 [==============================] - 0s 141us/step - loss: 3.5929e-07\n", + "Epoch 317/500\n", + "6/6 [==============================] - 0s 121us/step - loss: 3.5194e-07\n", + "Epoch 318/500\n", + "6/6 [==============================] - 0s 157us/step - loss: 3.4462e-07\n", + "Epoch 319/500\n", + "6/6 [==============================] - 0s 137us/step - loss: 3.3759e-07\n", + "Epoch 320/500\n", + "6/6 [==============================] - 0s 134us/step - loss: 3.3066e-07\n", + "Epoch 321/500\n", + "6/6 [==============================] - 0s 111us/step - loss: 3.2391e-07\n", + "Epoch 322/500\n", + "6/6 [==============================] - 0s 115us/step - loss: 3.1718e-07\n", + "Epoch 323/500\n", + "6/6 [==============================] - 0s 134us/step - loss: 3.1069e-07\n", + "Epoch 324/500\n", + "6/6 [==============================] - 0s 143us/step - loss: 3.0432e-07\n", + "Epoch 325/500\n", + "6/6 [==============================] - 0s 116us/step - loss: 2.9809e-07\n", + "Epoch 326/500\n", + "6/6 [==============================] - 0s 112us/step - loss: 2.9194e-07\n", + "Epoch 327/500\n", + "6/6 [==============================] - 0s 110us/step - loss: 2.8594e-07\n", + "Epoch 328/500\n", + "6/6 [==============================] - 0s 114us/step - loss: 2.8005e-07\n", + "Epoch 329/500\n", + "6/6 [==============================] - 0s 115us/step - loss: 2.7437e-07\n", + "Epoch 330/500\n", + "6/6 [==============================] - 0s 123us/step - loss: 2.6869e-07\n", + "Epoch 331/500\n", + "6/6 [==============================] - 0s 109us/step - loss: 2.6309e-07\n", + "Epoch 332/500\n", + "6/6 [==============================] - 0s 129us/step - loss: 2.5778e-07\n", + "Epoch 333/500\n", + "6/6 [==============================] - 0s 128us/step - loss: 2.5253e-07\n", + "Epoch 334/500\n", + "6/6 [==============================] - 0s 107us/step - loss: 2.4735e-07\n", + "Epoch 335/500\n", + "6/6 [==============================] - 0s 116us/step - loss: 2.4230e-07\n", + "Epoch 336/500\n", + "6/6 [==============================] - 0s 124us/step - loss: 2.3725e-07\n", + "Epoch 337/500\n", + "6/6 [==============================] - 0s 109us/step - loss: 2.3237e-07\n", + "Epoch 338/500\n", + "6/6 [==============================] - 0s 108us/step - loss: 2.2766e-07\n", + "Epoch 339/500\n", + "6/6 [==============================] - 0s 111us/step - loss: 2.2295e-07\n", + "Epoch 340/500\n", + "6/6 [==============================] - 0s 111us/step - loss: 2.1837e-07\n", + "Epoch 341/500\n", + "6/6 [==============================] - 0s 139us/step - loss: 2.1397e-07\n", + "Epoch 342/500\n", + "6/6 [==============================] - 0s 119us/step - loss: 2.0949e-07\n", + "Epoch 343/500\n", + "6/6 [==============================] - 0s 134us/step - loss: 2.0523e-07\n", + "Epoch 344/500\n", + "6/6 [==============================] - 0s 132us/step - loss: 2.0104e-07\n", + "Epoch 345/500\n", + "6/6 [==============================] - 0s 138us/step - loss: 1.9692e-07\n", + "Epoch 346/500\n", + "6/6 [==============================] - 0s 111us/step - loss: 1.9290e-07\n", + "Epoch 347/500\n", + "6/6 [==============================] - 0s 106us/step - loss: 1.8883e-07\n", + "Epoch 348/500\n", + "6/6 [==============================] - 0s 112us/step - loss: 1.8509e-07\n", + "Epoch 349/500\n", + "6/6 [==============================] - 0s 129us/step - loss: 1.8124e-07\n", + "Epoch 350/500\n", + "6/6 [==============================] - 0s 118us/step - loss: 1.7755e-07\n", + "Epoch 351/500\n", + "6/6 [==============================] - 0s 112us/step - loss: 1.7382e-07\n", + "Epoch 352/500\n", + "6/6 [==============================] - 0s 134us/step - loss: 1.7023e-07\n", + "Epoch 353/500\n", + "6/6 [==============================] - 0s 130us/step - loss: 1.6677e-07\n", + "Epoch 354/500\n", + "6/6 [==============================] - 0s 138us/step - loss: 1.6330e-07\n", + "Epoch 355/500\n", + "6/6 [==============================] - 0s 112us/step - loss: 1.5998e-07\n", + "Epoch 356/500\n", + "6/6 [==============================] - 0s 112us/step - loss: 1.5668e-07\n", + "Epoch 357/500\n", + "6/6 [==============================] - 0s 120us/step - loss: 1.5344e-07\n", + "Epoch 358/500\n", + "6/6 [==============================] - 0s 116us/step - loss: 1.5036e-07\n", + "Epoch 359/500\n", + "6/6 [==============================] - 0s 112us/step - loss: 1.4720e-07\n", + "Epoch 360/500\n", + "6/6 [==============================] - 0s 130us/step - loss: 1.4428e-07\n", + "Epoch 361/500\n", + "6/6 [==============================] - 0s 118us/step - loss: 1.4128e-07\n", + "Epoch 362/500\n", + "6/6 [==============================] - 0s 92us/step - loss: 1.3832e-07\n", + "Epoch 363/500\n", + "6/6 [==============================] - 0s 111us/step - loss: 1.3555e-07\n", + "Epoch 364/500\n", + "6/6 [==============================] - 0s 105us/step - loss: 1.3275e-07\n", + "Epoch 365/500\n", + "6/6 [==============================] - 0s 99us/step - loss: 1.3002e-07\n", + "Epoch 366/500\n", + "6/6 [==============================] - 0s 98us/step - loss: 1.2728e-07\n", + "Epoch 367/500\n", + "6/6 [==============================] - 0s 111us/step - loss: 1.2468e-07\n", + "Epoch 368/500\n", + "6/6 [==============================] - 0s 111us/step - loss: 1.2216e-07\n", + "Epoch 369/500\n", + "6/6 [==============================] - 0s 114us/step - loss: 1.1968e-07\n", + "Epoch 370/500\n", + "6/6 [==============================] - 0s 115us/step - loss: 1.1719e-07\n", + "Epoch 371/500\n", + "6/6 [==============================] - 0s 106us/step - loss: 1.1476e-07\n", + "Epoch 372/500\n", + "6/6 [==============================] - 0s 136us/step - loss: 1.1244e-07\n", + "Epoch 373/500\n", + "6/6 [==============================] - 0s 125us/step - loss: 1.1018e-07\n", + "Epoch 374/500\n", + "6/6 [==============================] - 0s 126us/step - loss: 1.0785e-07\n", + "Epoch 375/500\n", + "6/6 [==============================] - 0s 96us/step - loss: 1.0572e-07\n", + "Epoch 376/500\n", + "6/6 [==============================] - 0s 121us/step - loss: 1.0351e-07\n", + "Epoch 377/500\n", + "6/6 [==============================] - 0s 106us/step - loss: 1.0141e-07\n", + "Epoch 378/500\n", + "6/6 [==============================] - 0s 109us/step - loss: 9.9260e-08\n", + "Epoch 379/500\n", + "6/6 [==============================] - 0s 114us/step - loss: 9.7237e-08\n", + "Epoch 380/500\n", + "6/6 [==============================] - 0s 126us/step - loss: 9.5275e-08\n", + "Epoch 381/500\n", + "6/6 [==============================] - 0s 155us/step - loss: 9.3306e-08\n", + "Epoch 382/500\n", + "6/6 [==============================] - 0s 135us/step - loss: 9.1419e-08\n", + "Epoch 383/500\n", + "6/6 [==============================] - 0s 135us/step - loss: 8.9470e-08\n", + "Epoch 384/500\n", + "6/6 [==============================] - 0s 121us/step - loss: 8.7692e-08\n", + "Epoch 385/500\n", + "6/6 [==============================] - 0s 107us/step - loss: 8.5852e-08\n", + "Epoch 386/500\n", + "6/6 [==============================] - 0s 160us/step - loss: 8.4095e-08\n", + "Epoch 387/500\n", + "6/6 [==============================] - 0s 124us/step - loss: 8.2395e-08\n", + "Epoch 388/500\n", + "6/6 [==============================] - 0s 151us/step - loss: 8.0712e-08\n", + "Epoch 389/500\n", + "6/6 [==============================] - 0s 115us/step - loss: 7.9079e-08\n", + "Epoch 390/500\n", + "6/6 [==============================] - 0s 120us/step - loss: 7.7473e-08\n", + "Epoch 391/500\n", + "6/6 [==============================] - 0s 104us/step - loss: 7.5884e-08\n", + "Epoch 392/500\n", + "6/6 [==============================] - 0s 105us/step - loss: 7.4316e-08\n", + "Epoch 393/500\n", + "6/6 [==============================] - 0s 124us/step - loss: 7.2800e-08\n", + "Epoch 394/500\n", + "6/6 [==============================] - 0s 106us/step - loss: 7.1294e-08\n", + "Epoch 395/500\n", + "6/6 [==============================] - 0s 131us/step - loss: 6.9846e-08\n", + "Epoch 396/500\n", + "6/6 [==============================] - 0s 176us/step - loss: 6.8420e-08\n", + "Epoch 397/500\n", + "6/6 [==============================] - 0s 157us/step - loss: 6.7025e-08\n", + "Epoch 398/500\n", + "6/6 [==============================] - 0s 107us/step - loss: 6.5626e-08\n", + "Epoch 399/500\n", + "6/6 [==============================] - 0s 125us/step - loss: 6.4250e-08\n", + "Epoch 400/500\n", + "6/6 [==============================] - 0s 90us/step - loss: 6.2965e-08\n", + "Epoch 401/500\n", + "6/6 [==============================] - 0s 122us/step - loss: 6.1622e-08\n", + "Epoch 402/500\n", + "6/6 [==============================] - 0s 121us/step - loss: 6.0372e-08\n", + "Epoch 403/500\n", + "6/6 [==============================] - 0s 118us/step - loss: 5.9116e-08\n", + "Epoch 404/500\n", + "6/6 [==============================] - 0s 184us/step - loss: 5.7923e-08\n", + "Epoch 405/500\n", + "6/6 [==============================] - 0s 180us/step - loss: 5.6723e-08\n", + "Epoch 406/500\n", + "6/6 [==============================] - 0s 209us/step - loss: 5.5610e-08\n", + "Epoch 407/500\n", + "6/6 [==============================] - 0s 126us/step - loss: 5.4441e-08\n", + "Epoch 408/500\n", + "6/6 [==============================] - 0s 141us/step - loss: 5.3338e-08\n", + "Epoch 409/500\n", + "6/6 [==============================] - 0s 136us/step - loss: 5.2289e-08\n", + "Epoch 410/500\n", + "6/6 [==============================] - 0s 128us/step - loss: 5.1215e-08\n", + "Epoch 411/500\n", + "6/6 [==============================] - 0s 141us/step - loss: 5.0168e-08\n", + "Epoch 412/500\n", + "6/6 [==============================] - 0s 124us/step - loss: 4.9121e-08\n", + "Epoch 413/500\n", + "6/6 [==============================] - 0s 123us/step - loss: 4.8102e-08\n", + "Epoch 414/500\n", + "6/6 [==============================] - 0s 220us/step - loss: 4.7169e-08\n", + "Epoch 415/500\n", + "6/6 [==============================] - 0s 134us/step - loss: 4.6176e-08\n", + "Epoch 416/500\n", + "6/6 [==============================] - 0s 120us/step - loss: 4.5244e-08\n", + "Epoch 417/500\n", + "6/6 [==============================] - 0s 111us/step - loss: 4.4306e-08\n", + "Epoch 418/500\n", + "6/6 [==============================] - 0s 108us/step - loss: 4.3398e-08\n", + "Epoch 419/500\n", + "6/6 [==============================] - 0s 139us/step - loss: 4.2500e-08\n", + "Epoch 420/500\n", + "6/6 [==============================] - 0s 130us/step - loss: 4.1632e-08\n", + "Epoch 421/500\n", + "6/6 [==============================] - 0s 113us/step - loss: 4.0758e-08\n", + "Epoch 422/500\n", + "6/6 [==============================] - 0s 133us/step - loss: 3.9940e-08\n", + "Epoch 423/500\n", + "6/6 [==============================] - 0s 142us/step - loss: 3.9067e-08\n", + "Epoch 424/500\n", + "6/6 [==============================] - 0s 116us/step - loss: 3.8272e-08\n", + "Epoch 425/500\n", + "6/6 [==============================] - 0s 128us/step - loss: 3.7499e-08\n", + "Epoch 426/500\n", + "6/6 [==============================] - 0s 173us/step - loss: 3.6725e-08\n", + "Epoch 427/500\n", + "6/6 [==============================] - 0s 116us/step - loss: 3.5974e-08\n", + "Epoch 428/500\n", + "6/6 [==============================] - 0s 113us/step - loss: 3.5215e-08\n", + "Epoch 429/500\n", + "6/6 [==============================] - 0s 125us/step - loss: 3.4502e-08\n", + "Epoch 430/500\n", + "6/6 [==============================] - 0s 120us/step - loss: 3.3798e-08\n", + "Epoch 431/500\n", + "6/6 [==============================] - 0s 112us/step - loss: 3.3094e-08\n", + "Epoch 432/500\n", + "6/6 [==============================] - 0s 105us/step - loss: 3.2408e-08\n", + "Epoch 433/500\n", + "6/6 [==============================] - 0s 135us/step - loss: 3.1752e-08\n", + "Epoch 434/500\n", + "6/6 [==============================] - 0s 114us/step - loss: 3.1123e-08\n", + "Epoch 435/500\n", + "6/6 [==============================] - 0s 108us/step - loss: 3.0505e-08\n", + "Epoch 436/500\n", + "6/6 [==============================] - 0s 117us/step - loss: 2.9875e-08\n", + "Epoch 437/500\n", + "6/6 [==============================] - 0s 123us/step - loss: 2.9253e-08\n", + "Epoch 438/500\n", + "6/6 [==============================] - 0s 100us/step - loss: 2.8660e-08\n", + "Epoch 439/500\n", + "6/6 [==============================] - 0s 112us/step - loss: 2.8055e-08\n", + "Epoch 440/500\n", + "6/6 [==============================] - 0s 118us/step - loss: 2.7524e-08\n", + "Epoch 441/500\n", + "6/6 [==============================] - 0s 107us/step - loss: 2.6968e-08\n", + "Epoch 442/500\n", + "6/6 [==============================] - 0s 109us/step - loss: 2.6387e-08\n", + "Epoch 443/500\n", + "6/6 [==============================] - 0s 115us/step - loss: 2.5865e-08\n", + "Epoch 444/500\n", + "6/6 [==============================] - 0s 104us/step - loss: 2.5343e-08\n", + "Epoch 445/500\n", + "6/6 [==============================] - 0s 151us/step - loss: 2.4817e-08\n", + "Epoch 446/500\n", + "6/6 [==============================] - 0s 136us/step - loss: 2.4327e-08\n", + "Epoch 447/500\n", + "6/6 [==============================] - 0s 135us/step - loss: 2.3818e-08\n", + "Epoch 448/500\n", + "6/6 [==============================] - 0s 135us/step - loss: 2.3324e-08\n", + "Epoch 449/500\n", + "6/6 [==============================] - 0s 121us/step - loss: 2.2866e-08\n", + "Epoch 450/500\n", + "6/6 [==============================] - 0s 121us/step - loss: 2.2371e-08\n", + "Epoch 451/500\n", + "6/6 [==============================] - 0s 125us/step - loss: 2.1897e-08\n", + "Epoch 452/500\n", + "6/6 [==============================] - 0s 116us/step - loss: 2.1476e-08\n", + "Epoch 453/500\n", + "6/6 [==============================] - 0s 107us/step - loss: 2.1011e-08\n", + "Epoch 454/500\n", + "6/6 [==============================] - 0s 108us/step - loss: 2.0585e-08\n", + "Epoch 455/500\n", + "6/6 [==============================] - 0s 125us/step - loss: 2.0154e-08\n", + "Epoch 456/500\n", + "6/6 [==============================] - 0s 120us/step - loss: 1.9737e-08\n", + "Epoch 457/500\n", + "6/6 [==============================] - 0s 106us/step - loss: 1.9299e-08\n", + "Epoch 458/500\n", + "6/6 [==============================] - 0s 118us/step - loss: 1.8910e-08\n", + "Epoch 459/500\n", + "6/6 [==============================] - 0s 145us/step - loss: 1.8524e-08\n", + "Epoch 460/500\n", + "6/6 [==============================] - 0s 125us/step - loss: 1.8159e-08\n", + "Epoch 461/500\n", + "6/6 [==============================] - 0s 154us/step - loss: 1.7796e-08\n", + "Epoch 462/500\n", + "6/6 [==============================] - 0s 130us/step - loss: 1.7425e-08\n", + "Epoch 463/500\n", + "6/6 [==============================] - 0s 115us/step - loss: 1.7075e-08\n", + "Epoch 464/500\n", + "6/6 [==============================] - 0s 114us/step - loss: 1.6702e-08\n", + "Epoch 465/500\n", + "6/6 [==============================] - 0s 122us/step - loss: 1.6374e-08\n", + "Epoch 466/500\n", + "6/6 [==============================] - 0s 110us/step - loss: 1.6061e-08\n", + "Epoch 467/500\n", + "6/6 [==============================] - 0s 129us/step - loss: 1.5715e-08\n", + "Epoch 468/500\n", + "6/6 [==============================] - 0s 108us/step - loss: 1.5401e-08\n", + "Epoch 469/500\n", + "6/6 [==============================] - 0s 100us/step - loss: 1.5072e-08\n", + "Epoch 470/500\n", + "6/6 [==============================] - 0s 119us/step - loss: 1.4769e-08\n", + "Epoch 471/500\n", + "6/6 [==============================] - 0s 110us/step - loss: 1.4475e-08\n", + "Epoch 472/500\n", + "6/6 [==============================] - 0s 103us/step - loss: 1.4188e-08\n", + "Epoch 473/500\n", + "6/6 [==============================] - 0s 133us/step - loss: 1.3906e-08\n", + "Epoch 474/500\n", + "6/6 [==============================] - 0s 129us/step - loss: 1.3625e-08\n", + "Epoch 475/500\n", + "6/6 [==============================] - 0s 128us/step - loss: 1.3346e-08\n", + "Epoch 476/500\n", + "6/6 [==============================] - 0s 123us/step - loss: 1.3076e-08\n", + "Epoch 477/500\n", + "6/6 [==============================] - 0s 107us/step - loss: 1.2806e-08\n", + "Epoch 478/500\n", + "6/6 [==============================] - 0s 106us/step - loss: 1.2540e-08\n", + "Epoch 479/500\n", + "6/6 [==============================] - 0s 140us/step - loss: 1.2288e-08\n", + "Epoch 480/500\n", + "6/6 [==============================] - 0s 130us/step - loss: 1.2053e-08\n", + "Epoch 481/500\n", + "6/6 [==============================] - 0s 135us/step - loss: 1.1799e-08\n", + "Epoch 482/500\n", + "6/6 [==============================] - 0s 111us/step - loss: 1.1569e-08\n", + "Epoch 483/500\n", + "6/6 [==============================] - 0s 110us/step - loss: 1.1330e-08\n", + "Epoch 484/500\n", + "6/6 [==============================] - 0s 130us/step - loss: 1.1107e-08\n", + "Epoch 485/500\n", + "6/6 [==============================] - 0s 124us/step - loss: 1.0873e-08\n", + "Epoch 486/500\n", + "6/6 [==============================] - 0s 119us/step - loss: 1.0655e-08\n", + "Epoch 487/500\n", + "6/6 [==============================] - 0s 108us/step - loss: 1.0429e-08\n", + "Epoch 488/500\n", + "6/6 [==============================] - 0s 113us/step - loss: 1.0225e-08\n", + "Epoch 489/500\n", + "6/6 [==============================] - 0s 125us/step - loss: 1.0003e-08\n", + "Epoch 490/500\n", + "6/6 [==============================] - 0s 135us/step - loss: 9.7966e-09\n", + "Epoch 491/500\n", + "6/6 [==============================] - 0s 159us/step - loss: 9.6028e-09\n", + "Epoch 492/500\n", + "6/6 [==============================] - 0s 184us/step - loss: 9.4121e-09\n", + "Epoch 493/500\n", + "6/6 [==============================] - 0s 151us/step - loss: 9.2201e-09\n", + "Epoch 494/500\n", + "6/6 [==============================] - 0s 148us/step - loss: 9.0133e-09\n", + "Epoch 495/500\n", + "6/6 [==============================] - 0s 118us/step - loss: 8.8277e-09\n", + "Epoch 496/500\n", + "6/6 [==============================] - 0s 112us/step - loss: 8.6555e-09\n", + "Epoch 497/500\n", + "6/6 [==============================] - 0s 98us/step - loss: 8.4635e-09\n", + "Epoch 498/500\n", + "6/6 [==============================] - 0s 119us/step - loss: 8.2862e-09\n", + "Epoch 499/500\n", + "6/6 [==============================] - 0s 157us/step - loss: 8.1217e-09\n", + "Epoch 500/500\n", + "6/6 [==============================] - 0s 126us/step - loss: 7.9374e-09\n" + ] + }, + { + "data": { + "text/plain": [ + "" + ] + }, + "execution_count": 5, + "metadata": { + "tags": [] + }, + "output_type": "execute_result" + } + ], + "source": [ + "model.fit(xs, ys, epochs=500)" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "colab_type": "text", + "id": "kaFIr71H2OZ-" + }, + "source": [ + "Ok, now you have a model that has been trained to learn the relationshop between X and Y. You can use the **model.predict** method to have it figure out the Y for a previously unknown X. So, for example, if X = 10, what do you think Y will be? Take a guess before you run this code:" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "colab": { + "height": 34 + }, + "colab_type": "code", + "executionInfo": { + "elapsed": 1082, + "status": "ok", + "timestamp": 1552616848824, + "user": { + "displayName": "Laurence Moroney", + "photoUrl": "https://lh3.googleusercontent.com/-RcxktLY-TBk/AAAAAAAAAAI/AAAAAAAAABY/b4V4dTIqmPI/s64/photo.jpg", + "userId": "06401446828348966425" + }, + "user_tz": -540 + }, + "id": "oxNzL4lS2Gui", + "outputId": "080c5d7a-aff6-4af2-a668-be993dd07ace" + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "[[ 31.00025749]]\n" + ] + } + ], + "source": [ + "print(model.predict([10.0]))" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "colab_type": "text", + "id": "btF2CSFH2iEX" + }, + "source": [ + "You might have thought 31, right? But it ended up being a little over. Why do you think that is? \n", + "\n", + "Remember that neural networks deal with probabilities, so given the data that we fed the NN with, it calculated that there is a very high probability that the relationship between X and Y is Y=3X+1, but with only 6 data points we can't know for sure. As a result, the result for 10 is very close to 31, but not necessarily 31. \n", + "\n", + "As you work with neural networks, you'll see this pattern recurring. You will almost always deal with probabilities, not certainties, and will do a little bit of coding to figure out what the result is based on the probabilities, particularly when it comes to classification.\n" + ] + } + ], + "metadata": { + "colab": { + "name": "Hello-ML-World.ipynb", + "provenance": [], + "toc_visible": true, + "version": "0.3.2" + }, + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.8.3" + } + }, + "nbformat": 4, + "nbformat_minor": 1 +} diff --git a/Lab1-Hello-ML-World.ipynb b/Lab1-Hello-ML-World.ipynb index 7b283fa..7dd46e5 100644 --- a/Lab1-Hello-ML-World.ipynb +++ b/Lab1-Hello-ML-World.ipynb @@ -1 +1,1309 @@ -{"nbformat":4,"nbformat_minor":0,"metadata":{"colab":{"name":"Hello-ML-World.ipynb","version":"0.3.2","provenance":[],"toc_visible":true},"kernelspec":{"name":"python3","display_name":"Python 3"}},"cells":[{"metadata":{"id":"ZIAkIlfmCe1B","colab_type":"text"},"cell_type":"markdown","source":["# The Hello World of Deep Learning with Neural Networks"]},{"metadata":{"id":"fA93WUy1zzWf","colab_type":"text"},"cell_type":"markdown","source":["Like every first app you should start with something super simple that shows the overall scaffolding for how your code works. \n","\n","In the case of creating neural networks, the sample I like to use is one where it learns the relationship between two numbers. So, for example, if you were writing code for a function like this, you already know the 'rules' -- \n","\n","\n","```\n","float my_function(float x){\n"," float y = (3 * x) + 1;\n"," return y;\n","}\n","```\n","\n","So how would you train a neural network to do the equivalent task? Using data! By feeding it with a set of Xs, and a set of Ys, it should be able to figure out the relationship between them. \n","\n","This is obviously a very different paradigm than what you might be used to, so let's step through it piece by piece.\n"]},{"metadata":{"id":"DzbtdRcZDO9B","colab_type":"text"},"cell_type":"markdown","source":["## Imports\n","\n","Let's start with our imports. Here we are importing TensorFlow and calling it tf for ease of use.\n","\n","We then import a library called numpy, which helps us to represent our data as lists easily and quickly.\n","\n","The framework for defining a neural network as a set of Sequential layers is called keras, so we import that too."]},{"metadata":{"id":"X9uIpOS2zx7k","colab_type":"code","colab":{}},"cell_type":"code","source":["import tensorflow as tf\n","import numpy as np\n","from tensorflow import keras"],"execution_count":0,"outputs":[]},{"metadata":{"id":"wwJGmDrQ0EoB","colab_type":"text"},"cell_type":"markdown","source":["## Define and Compile the Neural Network\n","\n","Next we will create the simplest possible neural network. It has 1 layer, and that layer has 1 neuron, and the input shape to it is just 1 value."]},{"metadata":{"id":"kQFAr_xo0M4T","colab_type":"code","colab":{}},"cell_type":"code","source":["model = tf.keras.Sequential([keras.layers.Dense(units=1, input_shape=[1])])"],"execution_count":0,"outputs":[]},{"metadata":{"id":"KhjZjZ-c0Ok9","colab_type":"text"},"cell_type":"markdown","source":["Now we compile our Neural Network. When we do so, we have to specify 2 functions, a loss and an optimizer.\n","\n","If you've seen lots of math for machine learning, here's where it's usually used, but in this case it's nicely encapsulated in functions for you. But what happens here -- let's explain...\n","\n","We know that in our function, the relationship between the numbers is y=3x+1. \n","\n","When the computer is trying to 'learn' that, it makes a guess...maybe y=10x+10. The LOSS function measures the guessed answers against the known correct answers and measures how well or how badly it did.\n","\n","It then uses the OPTIMIZER function to make another guess. Based on how the loss function went, it will try to minimize the loss. At that point maybe it will come up with somehting like y=5x+5, which, while still pretty bad, is closer to the correct result (i.e. the loss is lower)\n","\n","It will repeat this for the number of EPOCHS which you will see shortly. But first, here's how we tell it to use 'MEAN SQUARED ERROR' for the loss and 'STOCHASTIC GRADIENT DESCENT' for the optimizer. You don't need to understand the math for these yet, but you can see that they work! :)\n","\n","Over time you will learn the different and appropriate loss and optimizer functions for different scenarios. \n"]},{"metadata":{"id":"m8YQN1H41L-Y","colab_type":"code","colab":{}},"cell_type":"code","source":["model.compile(optimizer='sgd', loss='mean_squared_error')"],"execution_count":0,"outputs":[]},{"metadata":{"id":"5QyOUhFw1OUX","colab_type":"text"},"cell_type":"markdown","source":["## Providing the Data\n","\n","Next up we'll feed in some data. In this case we are taking 6 xs and 6ys. You can see that the relationship between these is that y=2x-1, so where x = -1, y=-3 etc. etc. \n","\n","A python library called 'Numpy' provides lots of array type data structures that are a defacto standard way of doing it. We declare that we want to use these by specifying the values asn an np.array[]"]},{"metadata":{"id":"4Dxk4q-jzEy4","colab_type":"code","colab":{}},"cell_type":"code","source":["xs = np.array([-1.0, 0.0, 1.0, 2.0, 3.0, 4.0], dtype=float)\n","ys = np.array([-2.0, 1.0, 4.0, 7.0, 10.0, 13.0], dtype=float)"],"execution_count":0,"outputs":[]},{"metadata":{"id":"n_YcWRElnM_b","colab_type":"text"},"cell_type":"markdown","source":["# Training the Neural Network"]},{"metadata":{"id":"c-Jk4dG91dvD","colab_type":"text"},"cell_type":"markdown","source":["The process of training the neural network, where it 'learns' the relationship between the Xs and Ys is in the **model.fit** call. This is where it will go through the loop we spoke about above, making a guess, measuring how good or bad it is (aka the loss), using the opimizer to make another guess etc. It will do it for the number of epochs you specify. When you run this code, you'll see the loss on the right hand side."]},{"metadata":{"id":"lpRrl7WK10Pq","colab_type":"code","colab":{"height":17034},"outputId":"61cb92f9-ad29-418d-ce9e-4c616b3b963c","executionInfo":{"status":"ok","timestamp":1552616831242,"user_tz":-540,"elapsed":1575,"user":{"displayName":"Laurence Moroney","photoUrl":"https://lh3.googleusercontent.com/-RcxktLY-TBk/AAAAAAAAAAI/AAAAAAAAABY/b4V4dTIqmPI/s64/photo.jpg","userId":"06401446828348966425"}}},"cell_type":"code","source":["model.fit(xs, ys, epochs=500)"],"execution_count":5,"outputs":[{"output_type":"stream","text":["Epoch 1/500\n","6/6 [==============================] - 0s 16ms/step - loss: 57.4875\n","Epoch 2/500\n","6/6 [==============================] - 0s 173us/step - loss: 45.2285\n","Epoch 3/500\n","6/6 [==============================] - 0s 171us/step - loss: 35.5836\n","Epoch 4/500\n","6/6 [==============================] - 0s 195us/step - loss: 27.9955\n","Epoch 5/500\n","6/6 [==============================] - 0s 157us/step - loss: 22.0256\n","Epoch 6/500\n","6/6 [==============================] - 0s 132us/step - loss: 17.3287\n","Epoch 7/500\n","6/6 [==============================] - 0s 134us/step - loss: 13.6334\n","Epoch 8/500\n","6/6 [==============================] - 0s 129us/step - loss: 10.7262\n","Epoch 9/500\n","6/6 [==============================] - 0s 154us/step - loss: 8.4389\n","Epoch 10/500\n","6/6 [==============================] - 0s 135us/step - loss: 6.6393\n","Epoch 11/500\n","6/6 [==============================] - 0s 115us/step - loss: 5.2235\n","Epoch 12/500\n","6/6 [==============================] - 0s 129us/step - loss: 4.1097\n","Epoch 13/500\n","6/6 [==============================] - 0s 152us/step - loss: 3.2333\n","Epoch 14/500\n","6/6 [==============================] - 0s 113us/step - loss: 2.5439\n","Epoch 15/500\n","6/6 [==============================] - 0s 124us/step - loss: 2.0014\n","Epoch 16/500\n","6/6 [==============================] - 0s 135us/step - loss: 1.5747\n","Epoch 17/500\n","6/6 [==============================] - 0s 137us/step - loss: 1.2389\n","Epoch 18/500\n","6/6 [==============================] - 0s 149us/step - loss: 0.9747\n","Epoch 19/500\n","6/6 [==============================] - 0s 142us/step - loss: 0.7669\n","Epoch 20/500\n","6/6 [==============================] - 0s 139us/step - loss: 0.6034\n","Epoch 21/500\n","6/6 [==============================] - 0s 139us/step - loss: 0.4748\n","Epoch 22/500\n","6/6 [==============================] - 0s 126us/step - loss: 0.3736\n","Epoch 23/500\n","6/6 [==============================] - 0s 118us/step - loss: 0.2939\n","Epoch 24/500\n","6/6 [==============================] - 0s 111us/step - loss: 0.2313\n","Epoch 25/500\n","6/6 [==============================] - 0s 142us/step - loss: 0.1820\n","Epoch 26/500\n","6/6 [==============================] - 0s 173us/step - loss: 0.1432\n","Epoch 27/500\n","6/6 [==============================] - 0s 154us/step - loss: 0.1127\n","Epoch 28/500\n","6/6 [==============================] - 0s 164us/step - loss: 0.0887\n","Epoch 29/500\n","6/6 [==============================] - 0s 149us/step - loss: 0.0698\n","Epoch 30/500\n","6/6 [==============================] - 0s 126us/step - loss: 0.0549\n","Epoch 31/500\n","6/6 [==============================] - 0s 114us/step - loss: 0.0433\n","Epoch 32/500\n","6/6 [==============================] - 0s 125us/step - loss: 0.0341\n","Epoch 33/500\n","6/6 [==============================] - 0s 131us/step - loss: 0.0268\n","Epoch 34/500\n","6/6 [==============================] - 0s 117us/step - loss: 0.0211\n","Epoch 35/500\n","6/6 [==============================] - 0s 121us/step - loss: 0.0166\n","Epoch 36/500\n","6/6 [==============================] - 0s 118us/step - loss: 0.0131\n","Epoch 37/500\n","6/6 [==============================] - 0s 118us/step - loss: 0.0103\n","Epoch 38/500\n","6/6 [==============================] - 0s 119us/step - loss: 0.0082\n","Epoch 39/500\n","6/6 [==============================] - 0s 117us/step - loss: 0.0064\n","Epoch 40/500\n","6/6 [==============================] - 0s 129us/step - loss: 0.0051\n","Epoch 41/500\n","6/6 [==============================] - 0s 109us/step - loss: 0.0040\n","Epoch 42/500\n","6/6 [==============================] - 0s 116us/step - loss: 0.0032\n","Epoch 43/500\n","6/6 [==============================] - 0s 107us/step - loss: 0.0025\n","Epoch 44/500\n","6/6 [==============================] - 0s 112us/step - loss: 0.0020\n","Epoch 45/500\n","6/6 [==============================] - 0s 122us/step - loss: 0.0016\n","Epoch 46/500\n","6/6 [==============================] - 0s 143us/step - loss: 0.0013\n","Epoch 47/500\n","6/6 [==============================] - 0s 136us/step - loss: 0.0010\n","Epoch 48/500\n","6/6 [==============================] - 0s 116us/step - loss: 8.2458e-04\n","Epoch 49/500\n","6/6 [==============================] - 0s 134us/step - loss: 6.6677e-04\n","Epoch 50/500\n","6/6 [==============================] - 0s 114us/step - loss: 5.4223e-04\n","Epoch 51/500\n","6/6 [==============================] - 0s 152us/step - loss: 4.4389e-04\n","Epoch 52/500\n","6/6 [==============================] - 0s 131us/step - loss: 3.6617e-04\n","Epoch 53/500\n","6/6 [==============================] - 0s 162us/step - loss: 3.0467e-04\n","Epoch 54/500\n","6/6 [==============================] - 0s 135us/step - loss: 2.5594e-04\n","Epoch 55/500\n","6/6 [==============================] - 0s 124us/step - loss: 2.1727e-04\n","Epoch 56/500\n","6/6 [==============================] - 0s 116us/step - loss: 1.8652e-04\n","Epoch 57/500\n","6/6 [==============================] - 0s 112us/step - loss: 1.6201e-04\n","Epoch 58/500\n","6/6 [==============================] - 0s 129us/step - loss: 1.4241e-04\n","Epoch 59/500\n","6/6 [==============================] - 0s 127us/step - loss: 1.2668e-04\n","Epoch 60/500\n","6/6 [==============================] - 0s 120us/step - loss: 1.1401e-04\n","Epoch 61/500\n","6/6 [==============================] - 0s 132us/step - loss: 1.0375e-04\n","Epoch 62/500\n","6/6 [==============================] - 0s 176us/step - loss: 9.5379e-05\n","Epoch 63/500\n","6/6 [==============================] - 0s 124us/step - loss: 8.8515e-05\n","Epoch 64/500\n","6/6 [==============================] - 0s 110us/step - loss: 8.2838e-05\n","Epoch 65/500\n","6/6 [==============================] - 0s 110us/step - loss: 7.8103e-05\n","Epoch 66/500\n","6/6 [==============================] - 0s 131us/step - loss: 7.4109e-05\n","Epoch 67/500\n","6/6 [==============================] - 0s 140us/step - loss: 7.0707e-05\n","Epoch 68/500\n","6/6 [==============================] - 0s 133us/step - loss: 6.7776e-05\n","Epoch 69/500\n","6/6 [==============================] - 0s 143us/step - loss: 6.5221e-05\n","Epoch 70/500\n","6/6 [==============================] - 0s 138us/step - loss: 6.2964e-05\n","Epoch 71/500\n","6/6 [==============================] - 0s 130us/step - loss: 6.0952e-05\n","Epoch 72/500\n","6/6 [==============================] - 0s 152us/step - loss: 5.9133e-05\n","Epoch 73/500\n","6/6 [==============================] - 0s 126us/step - loss: 5.7474e-05\n","Epoch 74/500\n","6/6 [==============================] - 0s 141us/step - loss: 5.5941e-05\n","Epoch 75/500\n","6/6 [==============================] - 0s 120us/step - loss: 5.4516e-05\n","Epoch 76/500\n","6/6 [==============================] - 0s 101us/step - loss: 5.3179e-05\n","Epoch 77/500\n","6/6 [==============================] - 0s 123us/step - loss: 5.1917e-05\n","Epoch 78/500\n","6/6 [==============================] - 0s 157us/step - loss: 5.0715e-05\n","Epoch 79/500\n","6/6 [==============================] - 0s 152us/step - loss: 4.9569e-05\n","Epoch 80/500\n","6/6 [==============================] - 0s 148us/step - loss: 4.8467e-05\n","Epoch 81/500\n","6/6 [==============================] - 0s 147us/step - loss: 4.7406e-05\n","Epoch 82/500\n","6/6 [==============================] - 0s 122us/step - loss: 4.6381e-05\n","Epoch 83/500\n","6/6 [==============================] - 0s 144us/step - loss: 4.5388e-05\n","Epoch 84/500\n","6/6 [==============================] - 0s 155us/step - loss: 4.4423e-05\n","Epoch 85/500\n","6/6 [==============================] - 0s 124us/step - loss: 4.3485e-05\n","Epoch 86/500\n","6/6 [==============================] - 0s 133us/step - loss: 4.2572e-05\n","Epoch 87/500\n","6/6 [==============================] - 0s 122us/step - loss: 4.1682e-05\n","Epoch 88/500\n","6/6 [==============================] - 0s 107us/step - loss: 4.0814e-05\n","Epoch 89/500\n","6/6 [==============================] - 0s 125us/step - loss: 3.9965e-05\n","Epoch 90/500\n","6/6 [==============================] - 0s 118us/step - loss: 3.9137e-05\n","Epoch 91/500\n","6/6 [==============================] - 0s 112us/step - loss: 3.8327e-05\n","Epoch 92/500\n","6/6 [==============================] - 0s 129us/step - loss: 3.7535e-05\n","Epoch 93/500\n","6/6 [==============================] - 0s 128us/step - loss: 3.6761e-05\n","Epoch 94/500\n","6/6 [==============================] - 0s 130us/step - loss: 3.6002e-05\n","Epoch 95/500\n","6/6 [==============================] - 0s 141us/step - loss: 3.5261e-05\n","Epoch 96/500\n","6/6 [==============================] - 0s 126us/step - loss: 3.4534e-05\n","Epoch 97/500\n","6/6 [==============================] - 0s 151us/step - loss: 3.3825e-05\n","Epoch 98/500\n","6/6 [==============================] - 0s 161us/step - loss: 3.3128e-05\n","Epoch 99/500\n","6/6 [==============================] - 0s 126us/step - loss: 3.2447e-05\n","Epoch 100/500\n","6/6 [==============================] - 0s 175us/step - loss: 3.1780e-05\n","Epoch 101/500\n","6/6 [==============================] - 0s 166us/step - loss: 3.1126e-05\n","Epoch 102/500\n","6/6 [==============================] - 0s 148us/step - loss: 3.0486e-05\n","Epoch 103/500\n","6/6 [==============================] - 0s 121us/step - loss: 2.9860e-05\n","Epoch 104/500\n","6/6 [==============================] - 0s 127us/step - loss: 2.9246e-05\n","Epoch 105/500\n","6/6 [==============================] - 0s 135us/step - loss: 2.8645e-05\n","Epoch 106/500\n","6/6 [==============================] - 0s 150us/step - loss: 2.8056e-05\n","Epoch 107/500\n","6/6 [==============================] - 0s 158us/step - loss: 2.7481e-05\n","Epoch 108/500\n","6/6 [==============================] - 0s 133us/step - loss: 2.6916e-05\n","Epoch 109/500\n","6/6 [==============================] - 0s 165us/step - loss: 2.6363e-05\n","Epoch 110/500\n","6/6 [==============================] - 0s 149us/step - loss: 2.5821e-05\n","Epoch 111/500\n","6/6 [==============================] - 0s 144us/step - loss: 2.5290e-05\n","Epoch 112/500\n","6/6 [==============================] - 0s 128us/step - loss: 2.4771e-05\n","Epoch 113/500\n","6/6 [==============================] - 0s 116us/step - loss: 2.4263e-05\n","Epoch 114/500\n","6/6 [==============================] - 0s 124us/step - loss: 2.3763e-05\n","Epoch 115/500\n","6/6 [==============================] - 0s 117us/step - loss: 2.3276e-05\n","Epoch 116/500\n","6/6 [==============================] - 0s 119us/step - loss: 2.2798e-05\n","Epoch 117/500\n","6/6 [==============================] - 0s 185us/step - loss: 2.2328e-05\n","Epoch 118/500\n","6/6 [==============================] - 0s 217us/step - loss: 2.1871e-05\n","Epoch 119/500\n","6/6 [==============================] - 0s 169us/step - loss: 2.1421e-05\n","Epoch 120/500\n","6/6 [==============================] - 0s 133us/step - loss: 2.0981e-05\n","Epoch 121/500\n","6/6 [==============================] - 0s 123us/step - loss: 2.0551e-05\n","Epoch 122/500\n","6/6 [==============================] - 0s 116us/step - loss: 2.0128e-05\n","Epoch 123/500\n","6/6 [==============================] - 0s 127us/step - loss: 1.9715e-05\n","Epoch 124/500\n","6/6 [==============================] - 0s 129us/step - loss: 1.9310e-05\n","Epoch 125/500\n","6/6 [==============================] - 0s 158us/step - loss: 1.8914e-05\n","Epoch 126/500\n","6/6 [==============================] - 0s 172us/step - loss: 1.8525e-05\n","Epoch 127/500\n","6/6 [==============================] - 0s 182us/step - loss: 1.8145e-05\n","Epoch 128/500\n","6/6 [==============================] - 0s 139us/step - loss: 1.7772e-05\n","Epoch 129/500\n","6/6 [==============================] - 0s 114us/step - loss: 1.7407e-05\n","Epoch 130/500\n","6/6 [==============================] - 0s 108us/step - loss: 1.7049e-05\n","Epoch 131/500\n","6/6 [==============================] - 0s 136us/step - loss: 1.6699e-05\n","Epoch 132/500\n","6/6 [==============================] - 0s 133us/step - loss: 1.6355e-05\n","Epoch 133/500\n","6/6 [==============================] - 0s 115us/step - loss: 1.6020e-05\n","Epoch 134/500\n","6/6 [==============================] - 0s 117us/step - loss: 1.5691e-05\n","Epoch 135/500\n","6/6 [==============================] - 0s 161us/step - loss: 1.5369e-05\n","Epoch 136/500\n","6/6 [==============================] - 0s 155us/step - loss: 1.5052e-05\n","Epoch 137/500\n","6/6 [==============================] - 0s 108us/step - loss: 1.4743e-05\n","Epoch 138/500\n","6/6 [==============================] - 0s 131us/step - loss: 1.4441e-05\n","Epoch 139/500\n","6/6 [==============================] - 0s 109us/step - loss: 1.4144e-05\n","Epoch 140/500\n","6/6 [==============================] - 0s 128us/step - loss: 1.3854e-05\n","Epoch 141/500\n","6/6 [==============================] - 0s 111us/step - loss: 1.3569e-05\n","Epoch 142/500\n","6/6 [==============================] - 0s 153us/step - loss: 1.3290e-05\n","Epoch 143/500\n","6/6 [==============================] - 0s 155us/step - loss: 1.3017e-05\n","Epoch 144/500\n","6/6 [==============================] - 0s 129us/step - loss: 1.2750e-05\n","Epoch 145/500\n","6/6 [==============================] - 0s 105us/step - loss: 1.2488e-05\n","Epoch 146/500\n","6/6 [==============================] - 0s 107us/step - loss: 1.2232e-05\n","Epoch 147/500\n","6/6 [==============================] - 0s 111us/step - loss: 1.1980e-05\n","Epoch 148/500\n","6/6 [==============================] - 0s 118us/step - loss: 1.1735e-05\n","Epoch 149/500\n","6/6 [==============================] - 0s 152us/step - loss: 1.1493e-05\n","Epoch 150/500\n","6/6 [==============================] - 0s 120us/step - loss: 1.1258e-05\n","Epoch 151/500\n","6/6 [==============================] - 0s 127us/step - loss: 1.1026e-05\n","Epoch 152/500\n","6/6 [==============================] - 0s 117us/step - loss: 1.0800e-05\n","Epoch 153/500\n","6/6 [==============================] - 0s 100us/step - loss: 1.0578e-05\n","Epoch 154/500\n","6/6 [==============================] - 0s 93us/step - loss: 1.0361e-05\n","Epoch 155/500\n","6/6 [==============================] - 0s 105us/step - loss: 1.0148e-05\n","Epoch 156/500\n","6/6 [==============================] - 0s 142us/step - loss: 9.9390e-06\n","Epoch 157/500\n","6/6 [==============================] - 0s 124us/step - loss: 9.7356e-06\n","Epoch 158/500\n","6/6 [==============================] - 0s 143us/step - loss: 9.5355e-06\n","Epoch 159/500\n","6/6 [==============================] - 0s 131us/step - loss: 9.3398e-06\n","Epoch 160/500\n","6/6 [==============================] - 0s 124us/step - loss: 9.1474e-06\n","Epoch 161/500\n","6/6 [==============================] - 0s 137us/step - loss: 8.9598e-06\n","Epoch 162/500\n","6/6 [==============================] - 0s 139us/step - loss: 8.7757e-06\n","Epoch 163/500\n","6/6 [==============================] - 0s 146us/step - loss: 8.5954e-06\n","Epoch 164/500\n","6/6 [==============================] - 0s 164us/step - loss: 8.4188e-06\n","Epoch 165/500\n","6/6 [==============================] - 0s 116us/step - loss: 8.2452e-06\n","Epoch 166/500\n","6/6 [==============================] - 0s 135us/step - loss: 8.0767e-06\n","Epoch 167/500\n","6/6 [==============================] - 0s 149us/step - loss: 7.9103e-06\n","Epoch 168/500\n","6/6 [==============================] - 0s 220us/step - loss: 7.7484e-06\n","Epoch 169/500\n","6/6 [==============================] - 0s 143us/step - loss: 7.5892e-06\n","Epoch 170/500\n","6/6 [==============================] - 0s 155us/step - loss: 7.4332e-06\n","Epoch 171/500\n","6/6 [==============================] - 0s 156us/step - loss: 7.2802e-06\n","Epoch 172/500\n","6/6 [==============================] - 0s 152us/step - loss: 7.1305e-06\n","Epoch 173/500\n","6/6 [==============================] - 0s 149us/step - loss: 6.9842e-06\n","Epoch 174/500\n","6/6 [==============================] - 0s 143us/step - loss: 6.8411e-06\n","Epoch 175/500\n","6/6 [==============================] - 0s 116us/step - loss: 6.7008e-06\n","Epoch 176/500\n","6/6 [==============================] - 0s 129us/step - loss: 6.5629e-06\n","Epoch 177/500\n","6/6 [==============================] - 0s 159us/step - loss: 6.4276e-06\n","Epoch 178/500\n","6/6 [==============================] - 0s 163us/step - loss: 6.2958e-06\n","Epoch 179/500\n","6/6 [==============================] - 0s 130us/step - loss: 6.1663e-06\n","Epoch 180/500\n","6/6 [==============================] - 0s 165us/step - loss: 6.0392e-06\n","Epoch 181/500\n","6/6 [==============================] - 0s 142us/step - loss: 5.9155e-06\n","Epoch 182/500\n","6/6 [==============================] - 0s 175us/step - loss: 5.7942e-06\n","Epoch 183/500\n","6/6 [==============================] - 0s 167us/step - loss: 5.6750e-06\n","Epoch 184/500\n","6/6 [==============================] - 0s 137us/step - loss: 5.5581e-06\n","Epoch 185/500\n","6/6 [==============================] - 0s 173us/step - loss: 5.4441e-06\n","Epoch 186/500\n","6/6 [==============================] - 0s 164us/step - loss: 5.3321e-06\n","Epoch 187/500\n","6/6 [==============================] - 0s 115us/step - loss: 5.2225e-06\n","Epoch 188/500\n","6/6 [==============================] - 0s 119us/step - loss: 5.1156e-06\n","Epoch 189/500\n","6/6 [==============================] - 0s 109us/step - loss: 5.0105e-06\n","Epoch 190/500\n","6/6 [==============================] - 0s 109us/step - loss: 4.9073e-06\n","Epoch 191/500\n","6/6 [==============================] - 0s 108us/step - loss: 4.8067e-06\n","Epoch 192/500\n","6/6 [==============================] - 0s 159us/step - loss: 4.7081e-06\n","Epoch 193/500\n","6/6 [==============================] - 0s 120us/step - loss: 4.6112e-06\n","Epoch 194/500\n","6/6 [==============================] - 0s 117us/step - loss: 4.5165e-06\n","Epoch 195/500\n","6/6 [==============================] - 0s 136us/step - loss: 4.4238e-06\n","Epoch 196/500\n","6/6 [==============================] - 0s 140us/step - loss: 4.3326e-06\n","Epoch 197/500\n","6/6 [==============================] - 0s 162us/step - loss: 4.2434e-06\n","Epoch 198/500\n","6/6 [==============================] - 0s 180us/step - loss: 4.1561e-06\n","Epoch 199/500\n","6/6 [==============================] - 0s 159us/step - loss: 4.0706e-06\n","Epoch 200/500\n","6/6 [==============================] - 0s 130us/step - loss: 3.9869e-06\n","Epoch 201/500\n","6/6 [==============================] - 0s 112us/step - loss: 3.9053e-06\n","Epoch 202/500\n","6/6 [==============================] - 0s 127us/step - loss: 3.8251e-06\n","Epoch 203/500\n","6/6 [==============================] - 0s 139us/step - loss: 3.7462e-06\n","Epoch 204/500\n","6/6 [==============================] - 0s 158us/step - loss: 3.6697e-06\n","Epoch 205/500\n","6/6 [==============================] - 0s 148us/step - loss: 3.5941e-06\n","Epoch 206/500\n","6/6 [==============================] - 0s 129us/step - loss: 3.5204e-06\n","Epoch 207/500\n","6/6 [==============================] - 0s 114us/step - loss: 3.4481e-06\n","Epoch 208/500\n","6/6 [==============================] - 0s 127us/step - loss: 3.3773e-06\n","Epoch 209/500\n","6/6 [==============================] - 0s 125us/step - loss: 3.3079e-06\n","Epoch 210/500\n","6/6 [==============================] - 0s 145us/step - loss: 3.2400e-06\n","Epoch 211/500\n","6/6 [==============================] - 0s 169us/step - loss: 3.1736e-06\n","Epoch 212/500\n","6/6 [==============================] - 0s 127us/step - loss: 3.1080e-06\n","Epoch 213/500\n","6/6 [==============================] - 0s 114us/step - loss: 3.0440e-06\n","Epoch 214/500\n","6/6 [==============================] - 0s 141us/step - loss: 2.9816e-06\n","Epoch 215/500\n","6/6 [==============================] - 0s 122us/step - loss: 2.9205e-06\n","Epoch 216/500\n","6/6 [==============================] - 0s 97us/step - loss: 2.8605e-06\n","Epoch 217/500\n","6/6 [==============================] - 0s 143us/step - loss: 2.8017e-06\n","Epoch 218/500\n","6/6 [==============================] - 0s 146us/step - loss: 2.7441e-06\n","Epoch 219/500\n","6/6 [==============================] - 0s 123us/step - loss: 2.6878e-06\n","Epoch 220/500\n","6/6 [==============================] - 0s 119us/step - loss: 2.6326e-06\n","Epoch 221/500\n","6/6 [==============================] - 0s 145us/step - loss: 2.5785e-06\n","Epoch 222/500\n","6/6 [==============================] - 0s 157us/step - loss: 2.5256e-06\n","Epoch 223/500\n","6/6 [==============================] - 0s 143us/step - loss: 2.4737e-06\n","Epoch 224/500\n","6/6 [==============================] - 0s 152us/step - loss: 2.4230e-06\n","Epoch 225/500\n","6/6 [==============================] - 0s 120us/step - loss: 2.3730e-06\n","Epoch 226/500\n","6/6 [==============================] - 0s 119us/step - loss: 2.3243e-06\n","Epoch 227/500\n","6/6 [==============================] - 0s 121us/step - loss: 2.2765e-06\n","Epoch 228/500\n","6/6 [==============================] - 0s 116us/step - loss: 2.2299e-06\n","Epoch 229/500\n","6/6 [==============================] - 0s 153us/step - loss: 2.1840e-06\n","Epoch 230/500\n","6/6 [==============================] - 0s 306us/step - loss: 2.1390e-06\n","Epoch 231/500\n","6/6 [==============================] - 0s 132us/step - loss: 2.0950e-06\n","Epoch 232/500\n","6/6 [==============================] - 0s 161us/step - loss: 2.0521e-06\n","Epoch 233/500\n","6/6 [==============================] - 0s 129us/step - loss: 2.0101e-06\n","Epoch 234/500\n","6/6 [==============================] - 0s 125us/step - loss: 1.9689e-06\n","Epoch 235/500\n","6/6 [==============================] - 0s 109us/step - loss: 1.9283e-06\n","Epoch 236/500\n","6/6 [==============================] - 0s 109us/step - loss: 1.8885e-06\n","Epoch 237/500\n","6/6 [==============================] - 0s 99us/step - loss: 1.8500e-06\n","Epoch 238/500\n","6/6 [==============================] - 0s 130us/step - loss: 1.8119e-06\n","Epoch 239/500\n","6/6 [==============================] - 0s 118us/step - loss: 1.7749e-06\n","Epoch 240/500\n","6/6 [==============================] - 0s 108us/step - loss: 1.7383e-06\n","Epoch 241/500\n","6/6 [==============================] - 0s 94us/step - loss: 1.7025e-06\n","Epoch 242/500\n","6/6 [==============================] - 0s 154us/step - loss: 1.6676e-06\n","Epoch 243/500\n","6/6 [==============================] - 0s 174us/step - loss: 1.6335e-06\n","Epoch 244/500\n","6/6 [==============================] - 0s 181us/step - loss: 1.5997e-06\n","Epoch 245/500\n","6/6 [==============================] - 0s 186us/step - loss: 1.5671e-06\n","Epoch 246/500\n","6/6 [==============================] - 0s 165us/step - loss: 1.5348e-06\n","Epoch 247/500\n","6/6 [==============================] - 0s 156us/step - loss: 1.5033e-06\n","Epoch 248/500\n","6/6 [==============================] - 0s 136us/step - loss: 1.4726e-06\n","Epoch 249/500\n","6/6 [==============================] - 0s 151us/step - loss: 1.4421e-06\n","Epoch 250/500\n","6/6 [==============================] - 0s 160us/step - loss: 1.4127e-06\n","Epoch 251/500\n","6/6 [==============================] - 0s 134us/step - loss: 1.3835e-06\n","Epoch 252/500\n","6/6 [==============================] - 0s 130us/step - loss: 1.3552e-06\n","Epoch 253/500\n","6/6 [==============================] - 0s 109us/step - loss: 1.3274e-06\n","Epoch 254/500\n","6/6 [==============================] - 0s 104us/step - loss: 1.3001e-06\n","Epoch 255/500\n","6/6 [==============================] - 0s 149us/step - loss: 1.2733e-06\n","Epoch 256/500\n","6/6 [==============================] - 0s 134us/step - loss: 1.2473e-06\n","Epoch 257/500\n","6/6 [==============================] - 0s 171us/step - loss: 1.2216e-06\n","Epoch 258/500\n","6/6 [==============================] - 0s 144us/step - loss: 1.1964e-06\n","Epoch 259/500\n","6/6 [==============================] - 0s 130us/step - loss: 1.1717e-06\n","Epoch 260/500\n","6/6 [==============================] - 0s 139us/step - loss: 1.1477e-06\n","Epoch 261/500\n","6/6 [==============================] - 0s 128us/step - loss: 1.1242e-06\n","Epoch 262/500\n","6/6 [==============================] - 0s 122us/step - loss: 1.1010e-06\n","Epoch 263/500\n","6/6 [==============================] - 0s 101us/step - loss: 1.0784e-06\n","Epoch 264/500\n","6/6 [==============================] - 0s 118us/step - loss: 1.0562e-06\n","Epoch 265/500\n","6/6 [==============================] - 0s 121us/step - loss: 1.0346e-06\n","Epoch 266/500\n","6/6 [==============================] - 0s 105us/step - loss: 1.0134e-06\n","Epoch 267/500\n","6/6 [==============================] - 0s 100us/step - loss: 9.9246e-07\n","Epoch 268/500\n","6/6 [==============================] - 0s 110us/step - loss: 9.7208e-07\n","Epoch 269/500\n","6/6 [==============================] - 0s 122us/step - loss: 9.5236e-07\n","Epoch 270/500\n","6/6 [==============================] - 0s 134us/step - loss: 9.3280e-07\n","Epoch 271/500\n","6/6 [==============================] - 0s 148us/step - loss: 9.1338e-07\n","Epoch 272/500\n","6/6 [==============================] - 0s 117us/step - loss: 8.9463e-07\n","Epoch 273/500\n","6/6 [==============================] - 0s 97us/step - loss: 8.7640e-07\n","Epoch 274/500\n","6/6 [==============================] - 0s 101us/step - loss: 8.5831e-07\n","Epoch 275/500\n","6/6 [==============================] - 0s 113us/step - loss: 8.4068e-07\n","Epoch 276/500\n","6/6 [==============================] - 0s 103us/step - loss: 8.2352e-07\n","Epoch 277/500\n","6/6 [==============================] - 0s 101us/step - loss: 8.0661e-07\n","Epoch 278/500\n","6/6 [==============================] - 0s 130us/step - loss: 7.9010e-07\n","Epoch 279/500\n","6/6 [==============================] - 0s 119us/step - loss: 7.7378e-07\n","Epoch 280/500\n","6/6 [==============================] - 0s 112us/step - loss: 7.5804e-07\n","Epoch 281/500\n","6/6 [==============================] - 0s 108us/step - loss: 7.4235e-07\n","Epoch 282/500\n","6/6 [==============================] - 0s 111us/step - loss: 7.2709e-07\n","Epoch 283/500\n","6/6 [==============================] - 0s 96us/step - loss: 7.1226e-07\n","Epoch 284/500\n","6/6 [==============================] - 0s 95us/step - loss: 6.9748e-07\n","Epoch 285/500\n","6/6 [==============================] - 0s 106us/step - loss: 6.8317e-07\n","Epoch 286/500\n","6/6 [==============================] - 0s 122us/step - loss: 6.6931e-07\n","Epoch 287/500\n","6/6 [==============================] - 0s 133us/step - loss: 6.5555e-07\n","Epoch 288/500\n","6/6 [==============================] - 0s 115us/step - loss: 6.4193e-07\n","Epoch 289/500\n","6/6 [==============================] - 0s 144us/step - loss: 6.2894e-07\n","Epoch 290/500\n","6/6 [==============================] - 0s 101us/step - loss: 6.1586e-07\n","Epoch 291/500\n","6/6 [==============================] - 0s 103us/step - loss: 6.0318e-07\n","Epoch 292/500\n","6/6 [==============================] - 0s 109us/step - loss: 5.9069e-07\n","Epoch 293/500\n","6/6 [==============================] - 0s 99us/step - loss: 5.7860e-07\n","Epoch 294/500\n","6/6 [==============================] - 0s 102us/step - loss: 5.6689e-07\n","Epoch 295/500\n","6/6 [==============================] - 0s 112us/step - loss: 5.5525e-07\n","Epoch 296/500\n","6/6 [==============================] - 0s 130us/step - loss: 5.4378e-07\n","Epoch 297/500\n","6/6 [==============================] - 0s 96us/step - loss: 5.3259e-07\n","Epoch 298/500\n","6/6 [==============================] - 0s 124us/step - loss: 5.2177e-07\n","Epoch 299/500\n","6/6 [==============================] - 0s 135us/step - loss: 5.1109e-07\n","Epoch 300/500\n","6/6 [==============================] - 0s 103us/step - loss: 5.0057e-07\n","Epoch 301/500\n","6/6 [==============================] - 0s 115us/step - loss: 4.9032e-07\n","Epoch 302/500\n","6/6 [==============================] - 0s 132us/step - loss: 4.8020e-07\n","Epoch 303/500\n","6/6 [==============================] - 0s 139us/step - loss: 4.7030e-07\n","Epoch 304/500\n","6/6 [==============================] - 0s 143us/step - loss: 4.6066e-07\n","Epoch 305/500\n","6/6 [==============================] - 0s 156us/step - loss: 4.5120e-07\n","Epoch 306/500\n","6/6 [==============================] - 0s 160us/step - loss: 4.4207e-07\n","Epoch 307/500\n","6/6 [==============================] - 0s 137us/step - loss: 4.3301e-07\n","Epoch 308/500\n","6/6 [==============================] - 0s 127us/step - loss: 4.2412e-07\n","Epoch 309/500\n","6/6 [==============================] - 0s 142us/step - loss: 4.1530e-07\n","Epoch 310/500\n","6/6 [==============================] - 0s 146us/step - loss: 4.0689e-07\n","Epoch 311/500\n","6/6 [==============================] - 0s 154us/step - loss: 3.9848e-07\n","Epoch 312/500\n","6/6 [==============================] - 0s 134us/step - loss: 3.9025e-07\n","Epoch 313/500\n","6/6 [==============================] - 0s 124us/step - loss: 3.8223e-07\n","Epoch 314/500\n","6/6 [==============================] - 0s 138us/step - loss: 3.7433e-07\n","Epoch 315/500\n","6/6 [==============================] - 0s 148us/step - loss: 3.6668e-07\n","Epoch 316/500\n","6/6 [==============================] - 0s 141us/step - loss: 3.5929e-07\n","Epoch 317/500\n","6/6 [==============================] - 0s 121us/step - loss: 3.5194e-07\n","Epoch 318/500\n","6/6 [==============================] - 0s 157us/step - loss: 3.4462e-07\n","Epoch 319/500\n","6/6 [==============================] - 0s 137us/step - loss: 3.3759e-07\n","Epoch 320/500\n","6/6 [==============================] - 0s 134us/step - loss: 3.3066e-07\n","Epoch 321/500\n","6/6 [==============================] - 0s 111us/step - loss: 3.2391e-07\n","Epoch 322/500\n","6/6 [==============================] - 0s 115us/step - loss: 3.1718e-07\n","Epoch 323/500\n","6/6 [==============================] - 0s 134us/step - loss: 3.1069e-07\n","Epoch 324/500\n","6/6 [==============================] - 0s 143us/step - loss: 3.0432e-07\n","Epoch 325/500\n","6/6 [==============================] - 0s 116us/step - loss: 2.9809e-07\n","Epoch 326/500\n","6/6 [==============================] - 0s 112us/step - loss: 2.9194e-07\n","Epoch 327/500\n","6/6 [==============================] - 0s 110us/step - loss: 2.8594e-07\n","Epoch 328/500\n","6/6 [==============================] - 0s 114us/step - loss: 2.8005e-07\n","Epoch 329/500\n","6/6 [==============================] - 0s 115us/step - loss: 2.7437e-07\n","Epoch 330/500\n","6/6 [==============================] - 0s 123us/step - loss: 2.6869e-07\n","Epoch 331/500\n","6/6 [==============================] - 0s 109us/step - loss: 2.6309e-07\n","Epoch 332/500\n","6/6 [==============================] - 0s 129us/step - loss: 2.5778e-07\n","Epoch 333/500\n","6/6 [==============================] - 0s 128us/step - loss: 2.5253e-07\n","Epoch 334/500\n","6/6 [==============================] - 0s 107us/step - loss: 2.4735e-07\n","Epoch 335/500\n","6/6 [==============================] - 0s 116us/step - loss: 2.4230e-07\n","Epoch 336/500\n","6/6 [==============================] - 0s 124us/step - loss: 2.3725e-07\n","Epoch 337/500\n","6/6 [==============================] - 0s 109us/step - loss: 2.3237e-07\n","Epoch 338/500\n","6/6 [==============================] - 0s 108us/step - loss: 2.2766e-07\n","Epoch 339/500\n","6/6 [==============================] - 0s 111us/step - loss: 2.2295e-07\n","Epoch 340/500\n","6/6 [==============================] - 0s 111us/step - loss: 2.1837e-07\n","Epoch 341/500\n","6/6 [==============================] - 0s 139us/step - loss: 2.1397e-07\n","Epoch 342/500\n","6/6 [==============================] - 0s 119us/step - loss: 2.0949e-07\n","Epoch 343/500\n","6/6 [==============================] - 0s 134us/step - loss: 2.0523e-07\n","Epoch 344/500\n","6/6 [==============================] - 0s 132us/step - loss: 2.0104e-07\n","Epoch 345/500\n","6/6 [==============================] - 0s 138us/step - loss: 1.9692e-07\n","Epoch 346/500\n","6/6 [==============================] - 0s 111us/step - loss: 1.9290e-07\n","Epoch 347/500\n","6/6 [==============================] - 0s 106us/step - loss: 1.8883e-07\n","Epoch 348/500\n","6/6 [==============================] - 0s 112us/step - loss: 1.8509e-07\n","Epoch 349/500\n","6/6 [==============================] - 0s 129us/step - loss: 1.8124e-07\n","Epoch 350/500\n","6/6 [==============================] - 0s 118us/step - loss: 1.7755e-07\n","Epoch 351/500\n","6/6 [==============================] - 0s 112us/step - loss: 1.7382e-07\n","Epoch 352/500\n","6/6 [==============================] - 0s 134us/step - loss: 1.7023e-07\n","Epoch 353/500\n","6/6 [==============================] - 0s 130us/step - loss: 1.6677e-07\n","Epoch 354/500\n","6/6 [==============================] - 0s 138us/step - loss: 1.6330e-07\n","Epoch 355/500\n","6/6 [==============================] - 0s 112us/step - loss: 1.5998e-07\n","Epoch 356/500\n","6/6 [==============================] - 0s 112us/step - loss: 1.5668e-07\n","Epoch 357/500\n","6/6 [==============================] - 0s 120us/step - loss: 1.5344e-07\n","Epoch 358/500\n","6/6 [==============================] - 0s 116us/step - loss: 1.5036e-07\n","Epoch 359/500\n","6/6 [==============================] - 0s 112us/step - loss: 1.4720e-07\n","Epoch 360/500\n","6/6 [==============================] - 0s 130us/step - loss: 1.4428e-07\n","Epoch 361/500\n","6/6 [==============================] - 0s 118us/step - loss: 1.4128e-07\n","Epoch 362/500\n","6/6 [==============================] - 0s 92us/step - loss: 1.3832e-07\n","Epoch 363/500\n","6/6 [==============================] - 0s 111us/step - loss: 1.3555e-07\n","Epoch 364/500\n","6/6 [==============================] - 0s 105us/step - loss: 1.3275e-07\n","Epoch 365/500\n","6/6 [==============================] - 0s 99us/step - loss: 1.3002e-07\n","Epoch 366/500\n","6/6 [==============================] - 0s 98us/step - loss: 1.2728e-07\n","Epoch 367/500\n","6/6 [==============================] - 0s 111us/step - loss: 1.2468e-07\n","Epoch 368/500\n","6/6 [==============================] - 0s 111us/step - loss: 1.2216e-07\n","Epoch 369/500\n","6/6 [==============================] - 0s 114us/step - loss: 1.1968e-07\n","Epoch 370/500\n","6/6 [==============================] - 0s 115us/step - loss: 1.1719e-07\n","Epoch 371/500\n","6/6 [==============================] - 0s 106us/step - loss: 1.1476e-07\n","Epoch 372/500\n","6/6 [==============================] - 0s 136us/step - loss: 1.1244e-07\n","Epoch 373/500\n","6/6 [==============================] - 0s 125us/step - loss: 1.1018e-07\n","Epoch 374/500\n","6/6 [==============================] - 0s 126us/step - loss: 1.0785e-07\n","Epoch 375/500\n","6/6 [==============================] - 0s 96us/step - loss: 1.0572e-07\n","Epoch 376/500\n","6/6 [==============================] - 0s 121us/step - loss: 1.0351e-07\n","Epoch 377/500\n","6/6 [==============================] - 0s 106us/step - loss: 1.0141e-07\n","Epoch 378/500\n","6/6 [==============================] - 0s 109us/step - loss: 9.9260e-08\n","Epoch 379/500\n","6/6 [==============================] - 0s 114us/step - loss: 9.7237e-08\n","Epoch 380/500\n","6/6 [==============================] - 0s 126us/step - loss: 9.5275e-08\n","Epoch 381/500\n","6/6 [==============================] - 0s 155us/step - loss: 9.3306e-08\n","Epoch 382/500\n","6/6 [==============================] - 0s 135us/step - loss: 9.1419e-08\n","Epoch 383/500\n","6/6 [==============================] - 0s 135us/step - loss: 8.9470e-08\n","Epoch 384/500\n","6/6 [==============================] - 0s 121us/step - loss: 8.7692e-08\n","Epoch 385/500\n","6/6 [==============================] - 0s 107us/step - loss: 8.5852e-08\n","Epoch 386/500\n","6/6 [==============================] - 0s 160us/step - loss: 8.4095e-08\n","Epoch 387/500\n","6/6 [==============================] - 0s 124us/step - loss: 8.2395e-08\n","Epoch 388/500\n","6/6 [==============================] - 0s 151us/step - loss: 8.0712e-08\n","Epoch 389/500\n","6/6 [==============================] - 0s 115us/step - loss: 7.9079e-08\n","Epoch 390/500\n","6/6 [==============================] - 0s 120us/step - loss: 7.7473e-08\n","Epoch 391/500\n","6/6 [==============================] - 0s 104us/step - loss: 7.5884e-08\n","Epoch 392/500\n","6/6 [==============================] - 0s 105us/step - loss: 7.4316e-08\n","Epoch 393/500\n","6/6 [==============================] - 0s 124us/step - loss: 7.2800e-08\n","Epoch 394/500\n","6/6 [==============================] - 0s 106us/step - loss: 7.1294e-08\n","Epoch 395/500\n","6/6 [==============================] - 0s 131us/step - loss: 6.9846e-08\n","Epoch 396/500\n","6/6 [==============================] - 0s 176us/step - loss: 6.8420e-08\n","Epoch 397/500\n","6/6 [==============================] - 0s 157us/step - loss: 6.7025e-08\n","Epoch 398/500\n","6/6 [==============================] - 0s 107us/step - loss: 6.5626e-08\n","Epoch 399/500\n","6/6 [==============================] - 0s 125us/step - loss: 6.4250e-08\n","Epoch 400/500\n","6/6 [==============================] - 0s 90us/step - loss: 6.2965e-08\n","Epoch 401/500\n","6/6 [==============================] - 0s 122us/step - loss: 6.1622e-08\n","Epoch 402/500\n","6/6 [==============================] - 0s 121us/step - loss: 6.0372e-08\n","Epoch 403/500\n","6/6 [==============================] - 0s 118us/step - loss: 5.9116e-08\n","Epoch 404/500\n","6/6 [==============================] - 0s 184us/step - loss: 5.7923e-08\n","Epoch 405/500\n","6/6 [==============================] - 0s 180us/step - loss: 5.6723e-08\n","Epoch 406/500\n","6/6 [==============================] - 0s 209us/step - loss: 5.5610e-08\n","Epoch 407/500\n","6/6 [==============================] - 0s 126us/step - loss: 5.4441e-08\n","Epoch 408/500\n","6/6 [==============================] - 0s 141us/step - loss: 5.3338e-08\n","Epoch 409/500\n","6/6 [==============================] - 0s 136us/step - loss: 5.2289e-08\n","Epoch 410/500\n","6/6 [==============================] - 0s 128us/step - loss: 5.1215e-08\n","Epoch 411/500\n","6/6 [==============================] - 0s 141us/step - loss: 5.0168e-08\n","Epoch 412/500\n","6/6 [==============================] - 0s 124us/step - loss: 4.9121e-08\n","Epoch 413/500\n","6/6 [==============================] - 0s 123us/step - loss: 4.8102e-08\n","Epoch 414/500\n","6/6 [==============================] - 0s 220us/step - loss: 4.7169e-08\n","Epoch 415/500\n","6/6 [==============================] - 0s 134us/step - loss: 4.6176e-08\n","Epoch 416/500\n","6/6 [==============================] - 0s 120us/step - loss: 4.5244e-08\n","Epoch 417/500\n","6/6 [==============================] - 0s 111us/step - loss: 4.4306e-08\n","Epoch 418/500\n","6/6 [==============================] - 0s 108us/step - loss: 4.3398e-08\n","Epoch 419/500\n","6/6 [==============================] - 0s 139us/step - loss: 4.2500e-08\n","Epoch 420/500\n","6/6 [==============================] - 0s 130us/step - loss: 4.1632e-08\n","Epoch 421/500\n","6/6 [==============================] - 0s 113us/step - loss: 4.0758e-08\n","Epoch 422/500\n","6/6 [==============================] - 0s 133us/step - loss: 3.9940e-08\n","Epoch 423/500\n","6/6 [==============================] - 0s 142us/step - loss: 3.9067e-08\n","Epoch 424/500\n","6/6 [==============================] - 0s 116us/step - loss: 3.8272e-08\n","Epoch 425/500\n","6/6 [==============================] - 0s 128us/step - loss: 3.7499e-08\n","Epoch 426/500\n","6/6 [==============================] - 0s 173us/step - loss: 3.6725e-08\n","Epoch 427/500\n","6/6 [==============================] - 0s 116us/step - loss: 3.5974e-08\n","Epoch 428/500\n","6/6 [==============================] - 0s 113us/step - loss: 3.5215e-08\n","Epoch 429/500\n","6/6 [==============================] - 0s 125us/step - loss: 3.4502e-08\n","Epoch 430/500\n","6/6 [==============================] - 0s 120us/step - loss: 3.3798e-08\n","Epoch 431/500\n","6/6 [==============================] - 0s 112us/step - loss: 3.3094e-08\n","Epoch 432/500\n","6/6 [==============================] - 0s 105us/step - loss: 3.2408e-08\n","Epoch 433/500\n","6/6 [==============================] - 0s 135us/step - loss: 3.1752e-08\n","Epoch 434/500\n","6/6 [==============================] - 0s 114us/step - loss: 3.1123e-08\n","Epoch 435/500\n","6/6 [==============================] - 0s 108us/step - loss: 3.0505e-08\n","Epoch 436/500\n","6/6 [==============================] - 0s 117us/step - loss: 2.9875e-08\n","Epoch 437/500\n","6/6 [==============================] - 0s 123us/step - loss: 2.9253e-08\n","Epoch 438/500\n","6/6 [==============================] - 0s 100us/step - loss: 2.8660e-08\n","Epoch 439/500\n","6/6 [==============================] - 0s 112us/step - loss: 2.8055e-08\n","Epoch 440/500\n","6/6 [==============================] - 0s 118us/step - loss: 2.7524e-08\n","Epoch 441/500\n","6/6 [==============================] - 0s 107us/step - loss: 2.6968e-08\n","Epoch 442/500\n","6/6 [==============================] - 0s 109us/step - loss: 2.6387e-08\n","Epoch 443/500\n","6/6 [==============================] - 0s 115us/step - loss: 2.5865e-08\n","Epoch 444/500\n","6/6 [==============================] - 0s 104us/step - loss: 2.5343e-08\n","Epoch 445/500\n","6/6 [==============================] - 0s 151us/step - loss: 2.4817e-08\n","Epoch 446/500\n","6/6 [==============================] - 0s 136us/step - loss: 2.4327e-08\n","Epoch 447/500\n","6/6 [==============================] - 0s 135us/step - loss: 2.3818e-08\n","Epoch 448/500\n","6/6 [==============================] - 0s 135us/step - loss: 2.3324e-08\n","Epoch 449/500\n","6/6 [==============================] - 0s 121us/step - loss: 2.2866e-08\n","Epoch 450/500\n","6/6 [==============================] - 0s 121us/step - loss: 2.2371e-08\n","Epoch 451/500\n","6/6 [==============================] - 0s 125us/step - loss: 2.1897e-08\n","Epoch 452/500\n","6/6 [==============================] - 0s 116us/step - loss: 2.1476e-08\n","Epoch 453/500\n","6/6 [==============================] - 0s 107us/step - loss: 2.1011e-08\n","Epoch 454/500\n","6/6 [==============================] - 0s 108us/step - loss: 2.0585e-08\n","Epoch 455/500\n","6/6 [==============================] - 0s 125us/step - loss: 2.0154e-08\n","Epoch 456/500\n","6/6 [==============================] - 0s 120us/step - loss: 1.9737e-08\n","Epoch 457/500\n","6/6 [==============================] - 0s 106us/step - loss: 1.9299e-08\n","Epoch 458/500\n","6/6 [==============================] - 0s 118us/step - loss: 1.8910e-08\n","Epoch 459/500\n","6/6 [==============================] - 0s 145us/step - loss: 1.8524e-08\n","Epoch 460/500\n","6/6 [==============================] - 0s 125us/step - loss: 1.8159e-08\n","Epoch 461/500\n","6/6 [==============================] - 0s 154us/step - loss: 1.7796e-08\n","Epoch 462/500\n","6/6 [==============================] - 0s 130us/step - loss: 1.7425e-08\n","Epoch 463/500\n","6/6 [==============================] - 0s 115us/step - loss: 1.7075e-08\n","Epoch 464/500\n","6/6 [==============================] - 0s 114us/step - loss: 1.6702e-08\n","Epoch 465/500\n","6/6 [==============================] - 0s 122us/step - loss: 1.6374e-08\n","Epoch 466/500\n","6/6 [==============================] - 0s 110us/step - loss: 1.6061e-08\n","Epoch 467/500\n","6/6 [==============================] - 0s 129us/step - loss: 1.5715e-08\n","Epoch 468/500\n","6/6 [==============================] - 0s 108us/step - loss: 1.5401e-08\n","Epoch 469/500\n","6/6 [==============================] - 0s 100us/step - loss: 1.5072e-08\n","Epoch 470/500\n","6/6 [==============================] - 0s 119us/step - loss: 1.4769e-08\n","Epoch 471/500\n","6/6 [==============================] - 0s 110us/step - loss: 1.4475e-08\n","Epoch 472/500\n","6/6 [==============================] - 0s 103us/step - loss: 1.4188e-08\n","Epoch 473/500\n","6/6 [==============================] - 0s 133us/step - loss: 1.3906e-08\n","Epoch 474/500\n","6/6 [==============================] - 0s 129us/step - loss: 1.3625e-08\n","Epoch 475/500\n","6/6 [==============================] - 0s 128us/step - loss: 1.3346e-08\n","Epoch 476/500\n","6/6 [==============================] - 0s 123us/step - loss: 1.3076e-08\n","Epoch 477/500\n","6/6 [==============================] - 0s 107us/step - loss: 1.2806e-08\n","Epoch 478/500\n","6/6 [==============================] - 0s 106us/step - loss: 1.2540e-08\n","Epoch 479/500\n","6/6 [==============================] - 0s 140us/step - loss: 1.2288e-08\n","Epoch 480/500\n","6/6 [==============================] - 0s 130us/step - loss: 1.2053e-08\n","Epoch 481/500\n","6/6 [==============================] - 0s 135us/step - loss: 1.1799e-08\n","Epoch 482/500\n","6/6 [==============================] - 0s 111us/step - loss: 1.1569e-08\n","Epoch 483/500\n","6/6 [==============================] - 0s 110us/step - loss: 1.1330e-08\n","Epoch 484/500\n","6/6 [==============================] - 0s 130us/step - loss: 1.1107e-08\n","Epoch 485/500\n","6/6 [==============================] - 0s 124us/step - loss: 1.0873e-08\n","Epoch 486/500\n","6/6 [==============================] - 0s 119us/step - loss: 1.0655e-08\n","Epoch 487/500\n","6/6 [==============================] - 0s 108us/step - loss: 1.0429e-08\n","Epoch 488/500\n","6/6 [==============================] - 0s 113us/step - loss: 1.0225e-08\n","Epoch 489/500\n","6/6 [==============================] - 0s 125us/step - loss: 1.0003e-08\n","Epoch 490/500\n","6/6 [==============================] - 0s 135us/step - loss: 9.7966e-09\n","Epoch 491/500\n","6/6 [==============================] - 0s 159us/step - loss: 9.6028e-09\n","Epoch 492/500\n","6/6 [==============================] - 0s 184us/step - loss: 9.4121e-09\n","Epoch 493/500\n","6/6 [==============================] - 0s 151us/step - loss: 9.2201e-09\n","Epoch 494/500\n","6/6 [==============================] - 0s 148us/step - loss: 9.0133e-09\n","Epoch 495/500\n","6/6 [==============================] - 0s 118us/step - loss: 8.8277e-09\n","Epoch 496/500\n","6/6 [==============================] - 0s 112us/step - loss: 8.6555e-09\n","Epoch 497/500\n","6/6 [==============================] - 0s 98us/step - loss: 8.4635e-09\n","Epoch 498/500\n","6/6 [==============================] - 0s 119us/step - loss: 8.2862e-09\n","Epoch 499/500\n","6/6 [==============================] - 0s 157us/step - loss: 8.1217e-09\n","Epoch 500/500\n","6/6 [==============================] - 0s 126us/step - loss: 7.9374e-09\n"],"name":"stdout"},{"output_type":"execute_result","data":{"text/plain":[""]},"metadata":{"tags":[]},"execution_count":5}]},{"metadata":{"id":"kaFIr71H2OZ-","colab_type":"text"},"cell_type":"markdown","source":["Ok, now you have a model that has been trained to learn the relationshop between X and Y. You can use the **model.predict** method to have it figure out the Y for a previously unknown X. So, for example, if X = 10, what do you think Y will be? Take a guess before you run this code:"]},{"metadata":{"id":"oxNzL4lS2Gui","colab_type":"code","colab":{"height":34},"outputId":"080c5d7a-aff6-4af2-a668-be993dd07ace","executionInfo":{"status":"ok","timestamp":1552616848824,"user_tz":-540,"elapsed":1082,"user":{"displayName":"Laurence Moroney","photoUrl":"https://lh3.googleusercontent.com/-RcxktLY-TBk/AAAAAAAAAAI/AAAAAAAAABY/b4V4dTIqmPI/s64/photo.jpg","userId":"06401446828348966425"}}},"cell_type":"code","source":["print(model.predict([10.0]))"],"execution_count":6,"outputs":[{"output_type":"stream","text":["[[ 31.00025749]]\n"],"name":"stdout"}]},{"metadata":{"id":"btF2CSFH2iEX","colab_type":"text"},"cell_type":"markdown","source":["You might have thought 31, right? But it ended up being a little over. Why do you think that is? \n","\n","Remember that neural networks deal with probabilities, so given the data that we fed the NN with, it calculated that there is a very high probability that the relationship between X and Y is Y=3X+1, but with only 6 data points we can't know for sure. As a result, the result for 10 is very close to 31, but not necessarily 31. \n","\n","As you work with neural networks, you'll see this pattern recurring. You will almost always deal with probabilities, not certainties, and will do a little bit of coding to figure out what the result is based on the probabilities, particularly when it comes to classification.\n"]}]} +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": { + "colab_type": "text", + "id": "ZIAkIlfmCe1B" + }, + "source": [ + "# The Hello World of Deep Learning with Neural Networks" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "colab_type": "text", + "id": "fA93WUy1zzWf" + }, + "source": [ + "Like every first app you should start with something super simple that shows the overall scaffolding for how your code works. \n", + "\n", + "In the case of creating neural networks, the sample I like to use is one where it learns the relationship between two numbers. So, for example, if you were writing code for a function like this, you already know the 'rules' -- \n", + "\n", + "\n", + "```\n", + "float my_function(float x){\n", + " float y = (3 * x) + 1;\n", + " return y;\n", + "}\n", + "```\n", + "\n", + "So how would you train a neural network to do the equivalent task? Using data! By feeding it with a set of Xs, and a set of Ys, it should be able to figure out the relationship between them. \n", + "\n", + "This is obviously a very different paradigm than what you might be used to, so let's step through it piece by piece.\n" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "colab_type": "text", + "id": "DzbtdRcZDO9B" + }, + "source": [ + "## Imports\n", + "\n", + "Let's start with our imports. Here we are importing TensorFlow and calling it tf for ease of use.\n", + "\n", + "We then import a library called numpy, which helps us to represent our data as lists easily and quickly.\n", + "\n", + "The framework for defining a neural network as a set of Sequential layers is called keras, so we import that too." + ] + }, + { + "cell_type": "code", + "execution_count": 0, + "metadata": { + "colab": {}, + "colab_type": "code", + "id": "X9uIpOS2zx7k" + }, + "outputs": [], + "source": [ + "import tensorflow as tf\n", + "import numpy as np\n", + "from tensorflow import keras" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "colab_type": "text", + "id": "wwJGmDrQ0EoB" + }, + "source": [ + "## Define and Compile the Neural Network\n", + "\n", + "Next we will create the simplest possible neural network. It has 1 layer, and that layer has 1 neuron, and the input shape to it is just 1 value." + ] + }, + { + "cell_type": "code", + "execution_count": 0, + "metadata": { + "colab": {}, + "colab_type": "code", + "id": "kQFAr_xo0M4T" + }, + "outputs": [], + "source": [ + "model = tf.keras.Sequential([keras.layers.Dense(units=1, input_shape=[1])])" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "colab_type": "text", + "id": "KhjZjZ-c0Ok9" + }, + "source": [ + "Now we compile our Neural Network. When we do so, we have to specify 2 functions, a loss and an optimizer.\n", + "\n", + "If you've seen lots of math for machine learning, here's where it's usually used, but in this case it's nicely encapsulated in functions for you. But what happens here -- let's explain...\n", + "\n", + "We know that in our function, the relationship between the numbers is y=3x+1. \n", + "\n", + "When the computer is trying to 'learn' that, it makes a guess...maybe y=10x+10. The LOSS function measures the guessed answers against the known correct answers and measures how well or how badly it did.\n", + "\n", + "It then uses the OPTIMIZER function to make another guess. Based on how the loss function went, it will try to minimize the loss. At that point maybe it will come up with somehting like y=5x+5, which, while still pretty bad, is closer to the correct result (i.e. the loss is lower)\n", + "\n", + "It will repeat this for the number of EPOCHS which you will see shortly. But first, here's how we tell it to use 'MEAN SQUARED ERROR' for the loss and 'STOCHASTIC GRADIENT DESCENT' for the optimizer. You don't need to understand the math for these yet, but you can see that they work! :)\n", + "\n", + "Over time you will learn the different and appropriate loss and optimizer functions for different scenarios. \n" + ] + }, + { + "cell_type": "code", + "execution_count": 0, + "metadata": { + "colab": {}, + "colab_type": "code", + "id": "m8YQN1H41L-Y" + }, + "outputs": [], + "source": [ + "model.compile(optimizer='sgd', loss='mean_squared_error')" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "colab_type": "text", + "id": "5QyOUhFw1OUX" + }, + "source": [ + "## Providing the Data\n", + "\n", + "Next up we'll feed in some data. In this case we are taking 6 xs and 6ys. You can see that the relationship between these is that y=3x-1, so where x = -1, y=-2 etc. etc. \n", + "\n", + "A python library called 'Numpy' provides lots of array type data structures that are a defacto standard way of doing it. We declare that we want to use these by specifying the values asn an np.array[]" + ] + }, + { + "cell_type": "code", + "execution_count": 0, + "metadata": { + "colab": {}, + "colab_type": "code", + "id": "4Dxk4q-jzEy4" + }, + "outputs": [], + "source": [ + "xs = np.array([-1.0, 0.0, 1.0, 2.0, 3.0, 4.0], dtype=float)\n", + "ys = np.array([-2.0, 1.0, 4.0, 7.0, 10.0, 13.0], dtype=float)" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "colab_type": "text", + "id": "n_YcWRElnM_b" + }, + "source": [ + "# Training the Neural Network" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "colab_type": "text", + "id": "c-Jk4dG91dvD" + }, + "source": [ + "The process of training the neural network, where it 'learns' the relationship between the Xs and Ys is in the **model.fit** call. This is where it will go through the loop we spoke about above, making a guess, measuring how good or bad it is (aka the loss), using the opimizer to make another guess etc. It will do it for the number of epochs you specify. When you run this code, you'll see the loss on the right hand side." + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "colab": { + "height": 17034 + }, + "colab_type": "code", + "executionInfo": { + "elapsed": 1575, + "status": "ok", + "timestamp": 1552616831242, + "user": { + "displayName": "Laurence Moroney", + "photoUrl": "https://lh3.googleusercontent.com/-RcxktLY-TBk/AAAAAAAAAAI/AAAAAAAAABY/b4V4dTIqmPI/s64/photo.jpg", + "userId": "06401446828348966425" + }, + "user_tz": -540 + }, + "id": "lpRrl7WK10Pq", + "outputId": "61cb92f9-ad29-418d-ce9e-4c616b3b963c" + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Epoch 1/500\n", + "6/6 [==============================] - 0s 16ms/step - loss: 57.4875\n", + "Epoch 2/500\n", + "6/6 [==============================] - 0s 173us/step - loss: 45.2285\n", + "Epoch 3/500\n", + "6/6 [==============================] - 0s 171us/step - loss: 35.5836\n", + "Epoch 4/500\n", + "6/6 [==============================] - 0s 195us/step - loss: 27.9955\n", + "Epoch 5/500\n", + "6/6 [==============================] - 0s 157us/step - loss: 22.0256\n", + "Epoch 6/500\n", + "6/6 [==============================] - 0s 132us/step - loss: 17.3287\n", + "Epoch 7/500\n", + "6/6 [==============================] - 0s 134us/step - loss: 13.6334\n", + "Epoch 8/500\n", + "6/6 [==============================] - 0s 129us/step - loss: 10.7262\n", + "Epoch 9/500\n", + "6/6 [==============================] - 0s 154us/step - loss: 8.4389\n", + "Epoch 10/500\n", + "6/6 [==============================] - 0s 135us/step - loss: 6.6393\n", + "Epoch 11/500\n", + "6/6 [==============================] - 0s 115us/step - loss: 5.2235\n", + "Epoch 12/500\n", + "6/6 [==============================] - 0s 129us/step - loss: 4.1097\n", + "Epoch 13/500\n", + "6/6 [==============================] - 0s 152us/step - loss: 3.2333\n", + "Epoch 14/500\n", + "6/6 [==============================] - 0s 113us/step - loss: 2.5439\n", + "Epoch 15/500\n", + "6/6 [==============================] - 0s 124us/step - loss: 2.0014\n", + "Epoch 16/500\n", + "6/6 [==============================] - 0s 135us/step - loss: 1.5747\n", + "Epoch 17/500\n", + "6/6 [==============================] - 0s 137us/step - loss: 1.2389\n", + "Epoch 18/500\n", + "6/6 [==============================] - 0s 149us/step - loss: 0.9747\n", + "Epoch 19/500\n", + "6/6 [==============================] - 0s 142us/step - loss: 0.7669\n", + "Epoch 20/500\n", + "6/6 [==============================] - 0s 139us/step - loss: 0.6034\n", + "Epoch 21/500\n", + "6/6 [==============================] - 0s 139us/step - loss: 0.4748\n", + "Epoch 22/500\n", + "6/6 [==============================] - 0s 126us/step - loss: 0.3736\n", + "Epoch 23/500\n", + "6/6 [==============================] - 0s 118us/step - loss: 0.2939\n", + "Epoch 24/500\n", + "6/6 [==============================] - 0s 111us/step - loss: 0.2313\n", + "Epoch 25/500\n", + "6/6 [==============================] - 0s 142us/step - loss: 0.1820\n", + "Epoch 26/500\n", + "6/6 [==============================] - 0s 173us/step - loss: 0.1432\n", + "Epoch 27/500\n", + "6/6 [==============================] - 0s 154us/step - loss: 0.1127\n", + "Epoch 28/500\n", + "6/6 [==============================] - 0s 164us/step - loss: 0.0887\n", + "Epoch 29/500\n", + "6/6 [==============================] - 0s 149us/step - loss: 0.0698\n", + "Epoch 30/500\n", + "6/6 [==============================] - 0s 126us/step - loss: 0.0549\n", + "Epoch 31/500\n", + "6/6 [==============================] - 0s 114us/step - loss: 0.0433\n", + "Epoch 32/500\n", + "6/6 [==============================] - 0s 125us/step - loss: 0.0341\n", + "Epoch 33/500\n", + "6/6 [==============================] - 0s 131us/step - loss: 0.0268\n", + "Epoch 34/500\n", + "6/6 [==============================] - 0s 117us/step - loss: 0.0211\n", + "Epoch 35/500\n", + "6/6 [==============================] - 0s 121us/step - loss: 0.0166\n", + "Epoch 36/500\n", + "6/6 [==============================] - 0s 118us/step - loss: 0.0131\n", + "Epoch 37/500\n", + "6/6 [==============================] - 0s 118us/step - loss: 0.0103\n", + "Epoch 38/500\n", + "6/6 [==============================] - 0s 119us/step - loss: 0.0082\n", + "Epoch 39/500\n", + "6/6 [==============================] - 0s 117us/step - loss: 0.0064\n", + "Epoch 40/500\n", + "6/6 [==============================] - 0s 129us/step - loss: 0.0051\n", + "Epoch 41/500\n", + "6/6 [==============================] - 0s 109us/step - loss: 0.0040\n", + "Epoch 42/500\n", + "6/6 [==============================] - 0s 116us/step - loss: 0.0032\n", + "Epoch 43/500\n", + "6/6 [==============================] - 0s 107us/step - loss: 0.0025\n", + "Epoch 44/500\n", + "6/6 [==============================] - 0s 112us/step - loss: 0.0020\n", + "Epoch 45/500\n", + "6/6 [==============================] - 0s 122us/step - loss: 0.0016\n", + "Epoch 46/500\n", + "6/6 [==============================] - 0s 143us/step - loss: 0.0013\n", + "Epoch 47/500\n", + "6/6 [==============================] - 0s 136us/step - loss: 0.0010\n", + "Epoch 48/500\n", + "6/6 [==============================] - 0s 116us/step - loss: 8.2458e-04\n", + "Epoch 49/500\n", + "6/6 [==============================] - 0s 134us/step - loss: 6.6677e-04\n", + "Epoch 50/500\n", + "6/6 [==============================] - 0s 114us/step - loss: 5.4223e-04\n", + "Epoch 51/500\n", + "6/6 [==============================] - 0s 152us/step - loss: 4.4389e-04\n", + "Epoch 52/500\n", + "6/6 [==============================] - 0s 131us/step - loss: 3.6617e-04\n", + "Epoch 53/500\n", + "6/6 [==============================] - 0s 162us/step - loss: 3.0467e-04\n", + "Epoch 54/500\n", + "6/6 [==============================] - 0s 135us/step - loss: 2.5594e-04\n", + "Epoch 55/500\n", + "6/6 [==============================] - 0s 124us/step - loss: 2.1727e-04\n", + "Epoch 56/500\n", + "6/6 [==============================] - 0s 116us/step - loss: 1.8652e-04\n", + "Epoch 57/500\n", + "6/6 [==============================] - 0s 112us/step - loss: 1.6201e-04\n", + "Epoch 58/500\n", + "6/6 [==============================] - 0s 129us/step - loss: 1.4241e-04\n", + "Epoch 59/500\n", + "6/6 [==============================] - 0s 127us/step - loss: 1.2668e-04\n", + "Epoch 60/500\n", + "6/6 [==============================] - 0s 120us/step - loss: 1.1401e-04\n", + "Epoch 61/500\n", + "6/6 [==============================] - 0s 132us/step - loss: 1.0375e-04\n", + "Epoch 62/500\n", + "6/6 [==============================] - 0s 176us/step - loss: 9.5379e-05\n", + "Epoch 63/500\n", + "6/6 [==============================] - 0s 124us/step - loss: 8.8515e-05\n", + "Epoch 64/500\n", + "6/6 [==============================] - 0s 110us/step - loss: 8.2838e-05\n", + "Epoch 65/500\n", + "6/6 [==============================] - 0s 110us/step - loss: 7.8103e-05\n", + "Epoch 66/500\n", + "6/6 [==============================] - 0s 131us/step - loss: 7.4109e-05\n", + "Epoch 67/500\n", + "6/6 [==============================] - 0s 140us/step - loss: 7.0707e-05\n", + "Epoch 68/500\n", + "6/6 [==============================] - 0s 133us/step - loss: 6.7776e-05\n", + "Epoch 69/500\n", + "6/6 [==============================] - 0s 143us/step - loss: 6.5221e-05\n", + "Epoch 70/500\n", + "6/6 [==============================] - 0s 138us/step - loss: 6.2964e-05\n", + "Epoch 71/500\n", + "6/6 [==============================] - 0s 130us/step - loss: 6.0952e-05\n", + "Epoch 72/500\n", + "6/6 [==============================] - 0s 152us/step - loss: 5.9133e-05\n", + "Epoch 73/500\n", + "6/6 [==============================] - 0s 126us/step - loss: 5.7474e-05\n", + "Epoch 74/500\n", + "6/6 [==============================] - 0s 141us/step - loss: 5.5941e-05\n", + "Epoch 75/500\n", + "6/6 [==============================] - 0s 120us/step - loss: 5.4516e-05\n", + "Epoch 76/500\n", + "6/6 [==============================] - 0s 101us/step - loss: 5.3179e-05\n", + "Epoch 77/500\n", + "6/6 [==============================] - 0s 123us/step - loss: 5.1917e-05\n", + "Epoch 78/500\n", + "6/6 [==============================] - 0s 157us/step - loss: 5.0715e-05\n", + "Epoch 79/500\n", + "6/6 [==============================] - 0s 152us/step - loss: 4.9569e-05\n", + "Epoch 80/500\n", + "6/6 [==============================] - 0s 148us/step - loss: 4.8467e-05\n", + "Epoch 81/500\n", + "6/6 [==============================] - 0s 147us/step - loss: 4.7406e-05\n", + "Epoch 82/500\n", + "6/6 [==============================] - 0s 122us/step - loss: 4.6381e-05\n", + "Epoch 83/500\n", + "6/6 [==============================] - 0s 144us/step - loss: 4.5388e-05\n", + "Epoch 84/500\n", + "6/6 [==============================] - 0s 155us/step - loss: 4.4423e-05\n", + "Epoch 85/500\n", + "6/6 [==============================] - 0s 124us/step - loss: 4.3485e-05\n", + "Epoch 86/500\n", + "6/6 [==============================] - 0s 133us/step - loss: 4.2572e-05\n", + "Epoch 87/500\n", + "6/6 [==============================] - 0s 122us/step - loss: 4.1682e-05\n", + "Epoch 88/500\n", + "6/6 [==============================] - 0s 107us/step - loss: 4.0814e-05\n", + "Epoch 89/500\n", + "6/6 [==============================] - 0s 125us/step - loss: 3.9965e-05\n", + "Epoch 90/500\n", + "6/6 [==============================] - 0s 118us/step - loss: 3.9137e-05\n", + "Epoch 91/500\n", + "6/6 [==============================] - 0s 112us/step - loss: 3.8327e-05\n", + "Epoch 92/500\n", + "6/6 [==============================] - 0s 129us/step - loss: 3.7535e-05\n", + "Epoch 93/500\n", + "6/6 [==============================] - 0s 128us/step - loss: 3.6761e-05\n", + "Epoch 94/500\n", + "6/6 [==============================] - 0s 130us/step - loss: 3.6002e-05\n", + "Epoch 95/500\n", + "6/6 [==============================] - 0s 141us/step - loss: 3.5261e-05\n", + "Epoch 96/500\n", + "6/6 [==============================] - 0s 126us/step - loss: 3.4534e-05\n", + "Epoch 97/500\n", + "6/6 [==============================] - 0s 151us/step - loss: 3.3825e-05\n", + "Epoch 98/500\n", + "6/6 [==============================] - 0s 161us/step - loss: 3.3128e-05\n", + "Epoch 99/500\n", + "6/6 [==============================] - 0s 126us/step - loss: 3.2447e-05\n", + "Epoch 100/500\n", + "6/6 [==============================] - 0s 175us/step - loss: 3.1780e-05\n", + "Epoch 101/500\n", + "6/6 [==============================] - 0s 166us/step - loss: 3.1126e-05\n", + "Epoch 102/500\n", + "6/6 [==============================] - 0s 148us/step - loss: 3.0486e-05\n", + "Epoch 103/500\n", + "6/6 [==============================] - 0s 121us/step - loss: 2.9860e-05\n", + "Epoch 104/500\n", + "6/6 [==============================] - 0s 127us/step - loss: 2.9246e-05\n", + "Epoch 105/500\n", + "6/6 [==============================] - 0s 135us/step - loss: 2.8645e-05\n", + "Epoch 106/500\n", + "6/6 [==============================] - 0s 150us/step - loss: 2.8056e-05\n", + "Epoch 107/500\n", + "6/6 [==============================] - 0s 158us/step - loss: 2.7481e-05\n", + "Epoch 108/500\n", + "6/6 [==============================] - 0s 133us/step - loss: 2.6916e-05\n", + "Epoch 109/500\n", + "6/6 [==============================] - 0s 165us/step - loss: 2.6363e-05\n", + "Epoch 110/500\n", + "6/6 [==============================] - 0s 149us/step - loss: 2.5821e-05\n", + "Epoch 111/500\n", + "6/6 [==============================] - 0s 144us/step - loss: 2.5290e-05\n", + "Epoch 112/500\n", + "6/6 [==============================] - 0s 128us/step - loss: 2.4771e-05\n", + "Epoch 113/500\n", + "6/6 [==============================] - 0s 116us/step - loss: 2.4263e-05\n", + "Epoch 114/500\n", + "6/6 [==============================] - 0s 124us/step - loss: 2.3763e-05\n", + "Epoch 115/500\n", + "6/6 [==============================] - 0s 117us/step - loss: 2.3276e-05\n", + "Epoch 116/500\n", + "6/6 [==============================] - 0s 119us/step - loss: 2.2798e-05\n", + "Epoch 117/500\n", + "6/6 [==============================] - 0s 185us/step - loss: 2.2328e-05\n", + "Epoch 118/500\n", + "6/6 [==============================] - 0s 217us/step - loss: 2.1871e-05\n", + "Epoch 119/500\n", + "6/6 [==============================] - 0s 169us/step - loss: 2.1421e-05\n", + "Epoch 120/500\n", + "6/6 [==============================] - 0s 133us/step - loss: 2.0981e-05\n", + "Epoch 121/500\n", + "6/6 [==============================] - 0s 123us/step - loss: 2.0551e-05\n", + "Epoch 122/500\n", + "6/6 [==============================] - 0s 116us/step - loss: 2.0128e-05\n", + "Epoch 123/500\n", + "6/6 [==============================] - 0s 127us/step - loss: 1.9715e-05\n", + "Epoch 124/500\n", + "6/6 [==============================] - 0s 129us/step - loss: 1.9310e-05\n", + "Epoch 125/500\n", + "6/6 [==============================] - 0s 158us/step - loss: 1.8914e-05\n", + "Epoch 126/500\n", + "6/6 [==============================] - 0s 172us/step - loss: 1.8525e-05\n", + "Epoch 127/500\n", + "6/6 [==============================] - 0s 182us/step - loss: 1.8145e-05\n", + "Epoch 128/500\n", + "6/6 [==============================] - 0s 139us/step - loss: 1.7772e-05\n", + "Epoch 129/500\n", + "6/6 [==============================] - 0s 114us/step - loss: 1.7407e-05\n", + "Epoch 130/500\n", + "6/6 [==============================] - 0s 108us/step - loss: 1.7049e-05\n", + "Epoch 131/500\n", + "6/6 [==============================] - 0s 136us/step - loss: 1.6699e-05\n", + "Epoch 132/500\n", + "6/6 [==============================] - 0s 133us/step - loss: 1.6355e-05\n", + "Epoch 133/500\n", + "6/6 [==============================] - 0s 115us/step - loss: 1.6020e-05\n", + "Epoch 134/500\n", + "6/6 [==============================] - 0s 117us/step - loss: 1.5691e-05\n", + "Epoch 135/500\n", + "6/6 [==============================] - 0s 161us/step - loss: 1.5369e-05\n", + "Epoch 136/500\n", + "6/6 [==============================] - 0s 155us/step - loss: 1.5052e-05\n", + "Epoch 137/500\n", + "6/6 [==============================] - 0s 108us/step - loss: 1.4743e-05\n", + "Epoch 138/500\n", + "6/6 [==============================] - 0s 131us/step - loss: 1.4441e-05\n", + "Epoch 139/500\n", + "6/6 [==============================] - 0s 109us/step - loss: 1.4144e-05\n", + "Epoch 140/500\n", + "6/6 [==============================] - 0s 128us/step - loss: 1.3854e-05\n", + "Epoch 141/500\n", + "6/6 [==============================] - 0s 111us/step - loss: 1.3569e-05\n", + "Epoch 142/500\n", + "6/6 [==============================] - 0s 153us/step - loss: 1.3290e-05\n", + "Epoch 143/500\n", + "6/6 [==============================] - 0s 155us/step - loss: 1.3017e-05\n", + "Epoch 144/500\n", + "6/6 [==============================] - 0s 129us/step - loss: 1.2750e-05\n", + "Epoch 145/500\n", + "6/6 [==============================] - 0s 105us/step - loss: 1.2488e-05\n", + "Epoch 146/500\n", + "6/6 [==============================] - 0s 107us/step - loss: 1.2232e-05\n", + "Epoch 147/500\n", + "6/6 [==============================] - 0s 111us/step - loss: 1.1980e-05\n", + "Epoch 148/500\n", + "6/6 [==============================] - 0s 118us/step - loss: 1.1735e-05\n", + "Epoch 149/500\n", + "6/6 [==============================] - 0s 152us/step - loss: 1.1493e-05\n", + "Epoch 150/500\n", + "6/6 [==============================] - 0s 120us/step - loss: 1.1258e-05\n", + "Epoch 151/500\n", + "6/6 [==============================] - 0s 127us/step - loss: 1.1026e-05\n", + "Epoch 152/500\n", + "6/6 [==============================] - 0s 117us/step - loss: 1.0800e-05\n", + "Epoch 153/500\n", + "6/6 [==============================] - 0s 100us/step - loss: 1.0578e-05\n", + "Epoch 154/500\n", + "6/6 [==============================] - 0s 93us/step - loss: 1.0361e-05\n", + "Epoch 155/500\n", + "6/6 [==============================] - 0s 105us/step - loss: 1.0148e-05\n", + "Epoch 156/500\n", + "6/6 [==============================] - 0s 142us/step - loss: 9.9390e-06\n", + "Epoch 157/500\n", + "6/6 [==============================] - 0s 124us/step - loss: 9.7356e-06\n", + "Epoch 158/500\n", + "6/6 [==============================] - 0s 143us/step - loss: 9.5355e-06\n", + "Epoch 159/500\n", + "6/6 [==============================] - 0s 131us/step - loss: 9.3398e-06\n", + "Epoch 160/500\n", + "6/6 [==============================] - 0s 124us/step - loss: 9.1474e-06\n", + "Epoch 161/500\n", + "6/6 [==============================] - 0s 137us/step - loss: 8.9598e-06\n", + "Epoch 162/500\n", + "6/6 [==============================] - 0s 139us/step - loss: 8.7757e-06\n", + "Epoch 163/500\n", + "6/6 [==============================] - 0s 146us/step - loss: 8.5954e-06\n", + "Epoch 164/500\n", + "6/6 [==============================] - 0s 164us/step - loss: 8.4188e-06\n", + "Epoch 165/500\n", + "6/6 [==============================] - 0s 116us/step - loss: 8.2452e-06\n", + "Epoch 166/500\n", + "6/6 [==============================] - 0s 135us/step - loss: 8.0767e-06\n", + "Epoch 167/500\n", + "6/6 [==============================] - 0s 149us/step - loss: 7.9103e-06\n", + "Epoch 168/500\n", + "6/6 [==============================] - 0s 220us/step - loss: 7.7484e-06\n", + "Epoch 169/500\n", + "6/6 [==============================] - 0s 143us/step - loss: 7.5892e-06\n", + "Epoch 170/500\n", + "6/6 [==============================] - 0s 155us/step - loss: 7.4332e-06\n", + "Epoch 171/500\n", + "6/6 [==============================] - 0s 156us/step - loss: 7.2802e-06\n", + "Epoch 172/500\n", + "6/6 [==============================] - 0s 152us/step - loss: 7.1305e-06\n", + "Epoch 173/500\n", + "6/6 [==============================] - 0s 149us/step - loss: 6.9842e-06\n", + "Epoch 174/500\n", + "6/6 [==============================] - 0s 143us/step - loss: 6.8411e-06\n", + "Epoch 175/500\n", + "6/6 [==============================] - 0s 116us/step - loss: 6.7008e-06\n", + "Epoch 176/500\n", + "6/6 [==============================] - 0s 129us/step - loss: 6.5629e-06\n", + "Epoch 177/500\n", + "6/6 [==============================] - 0s 159us/step - loss: 6.4276e-06\n", + "Epoch 178/500\n", + "6/6 [==============================] - 0s 163us/step - loss: 6.2958e-06\n", + "Epoch 179/500\n", + "6/6 [==============================] - 0s 130us/step - loss: 6.1663e-06\n", + "Epoch 180/500\n", + "6/6 [==============================] - 0s 165us/step - loss: 6.0392e-06\n", + "Epoch 181/500\n", + "6/6 [==============================] - 0s 142us/step - loss: 5.9155e-06\n", + "Epoch 182/500\n", + "6/6 [==============================] - 0s 175us/step - loss: 5.7942e-06\n", + "Epoch 183/500\n", + "6/6 [==============================] - 0s 167us/step - loss: 5.6750e-06\n", + "Epoch 184/500\n", + "6/6 [==============================] - 0s 137us/step - loss: 5.5581e-06\n", + "Epoch 185/500\n", + "6/6 [==============================] - 0s 173us/step - loss: 5.4441e-06\n", + "Epoch 186/500\n", + "6/6 [==============================] - 0s 164us/step - loss: 5.3321e-06\n", + "Epoch 187/500\n", + "6/6 [==============================] - 0s 115us/step - loss: 5.2225e-06\n", + "Epoch 188/500\n", + "6/6 [==============================] - 0s 119us/step - loss: 5.1156e-06\n", + "Epoch 189/500\n", + "6/6 [==============================] - 0s 109us/step - loss: 5.0105e-06\n", + "Epoch 190/500\n", + "6/6 [==============================] - 0s 109us/step - loss: 4.9073e-06\n", + "Epoch 191/500\n", + "6/6 [==============================] - 0s 108us/step - loss: 4.8067e-06\n", + "Epoch 192/500\n", + "6/6 [==============================] - 0s 159us/step - loss: 4.7081e-06\n", + "Epoch 193/500\n", + "6/6 [==============================] - 0s 120us/step - loss: 4.6112e-06\n", + "Epoch 194/500\n", + "6/6 [==============================] - 0s 117us/step - loss: 4.5165e-06\n", + "Epoch 195/500\n", + "6/6 [==============================] - 0s 136us/step - loss: 4.4238e-06\n", + "Epoch 196/500\n", + "6/6 [==============================] - 0s 140us/step - loss: 4.3326e-06\n", + "Epoch 197/500\n", + "6/6 [==============================] - 0s 162us/step - loss: 4.2434e-06\n", + "Epoch 198/500\n", + "6/6 [==============================] - 0s 180us/step - loss: 4.1561e-06\n", + "Epoch 199/500\n", + "6/6 [==============================] - 0s 159us/step - loss: 4.0706e-06\n", + "Epoch 200/500\n", + "6/6 [==============================] - 0s 130us/step - loss: 3.9869e-06\n", + "Epoch 201/500\n", + "6/6 [==============================] - 0s 112us/step - loss: 3.9053e-06\n", + "Epoch 202/500\n", + "6/6 [==============================] - 0s 127us/step - loss: 3.8251e-06\n", + "Epoch 203/500\n", + "6/6 [==============================] - 0s 139us/step - loss: 3.7462e-06\n", + "Epoch 204/500\n", + "6/6 [==============================] - 0s 158us/step - loss: 3.6697e-06\n", + "Epoch 205/500\n", + "6/6 [==============================] - 0s 148us/step - loss: 3.5941e-06\n", + "Epoch 206/500\n", + "6/6 [==============================] - 0s 129us/step - loss: 3.5204e-06\n", + "Epoch 207/500\n", + "6/6 [==============================] - 0s 114us/step - loss: 3.4481e-06\n", + "Epoch 208/500\n", + "6/6 [==============================] - 0s 127us/step - loss: 3.3773e-06\n", + "Epoch 209/500\n", + "6/6 [==============================] - 0s 125us/step - loss: 3.3079e-06\n", + "Epoch 210/500\n", + "6/6 [==============================] - 0s 145us/step - loss: 3.2400e-06\n", + "Epoch 211/500\n", + "6/6 [==============================] - 0s 169us/step - loss: 3.1736e-06\n", + "Epoch 212/500\n", + "6/6 [==============================] - 0s 127us/step - loss: 3.1080e-06\n", + "Epoch 213/500\n", + "6/6 [==============================] - 0s 114us/step - loss: 3.0440e-06\n", + "Epoch 214/500\n", + "6/6 [==============================] - 0s 141us/step - loss: 2.9816e-06\n", + "Epoch 215/500\n", + "6/6 [==============================] - 0s 122us/step - loss: 2.9205e-06\n", + "Epoch 216/500\n", + "6/6 [==============================] - 0s 97us/step - loss: 2.8605e-06\n", + "Epoch 217/500\n", + "6/6 [==============================] - 0s 143us/step - loss: 2.8017e-06\n", + "Epoch 218/500\n", + "6/6 [==============================] - 0s 146us/step - loss: 2.7441e-06\n", + "Epoch 219/500\n", + "6/6 [==============================] - 0s 123us/step - loss: 2.6878e-06\n", + "Epoch 220/500\n", + "6/6 [==============================] - 0s 119us/step - loss: 2.6326e-06\n", + "Epoch 221/500\n", + "6/6 [==============================] - 0s 145us/step - loss: 2.5785e-06\n", + "Epoch 222/500\n", + "6/6 [==============================] - 0s 157us/step - loss: 2.5256e-06\n", + "Epoch 223/500\n", + "6/6 [==============================] - 0s 143us/step - loss: 2.4737e-06\n", + "Epoch 224/500\n", + "6/6 [==============================] - 0s 152us/step - loss: 2.4230e-06\n", + "Epoch 225/500\n", + "6/6 [==============================] - 0s 120us/step - loss: 2.3730e-06\n", + "Epoch 226/500\n", + "6/6 [==============================] - 0s 119us/step - loss: 2.3243e-06\n", + "Epoch 227/500\n", + "6/6 [==============================] - 0s 121us/step - loss: 2.2765e-06\n", + "Epoch 228/500\n", + "6/6 [==============================] - 0s 116us/step - loss: 2.2299e-06\n", + "Epoch 229/500\n", + "6/6 [==============================] - 0s 153us/step - loss: 2.1840e-06\n", + "Epoch 230/500\n", + "6/6 [==============================] - 0s 306us/step - loss: 2.1390e-06\n", + "Epoch 231/500\n", + "6/6 [==============================] - 0s 132us/step - loss: 2.0950e-06\n", + "Epoch 232/500\n", + "6/6 [==============================] - 0s 161us/step - loss: 2.0521e-06\n", + "Epoch 233/500\n", + "6/6 [==============================] - 0s 129us/step - loss: 2.0101e-06\n", + "Epoch 234/500\n", + "6/6 [==============================] - 0s 125us/step - loss: 1.9689e-06\n", + "Epoch 235/500\n", + "6/6 [==============================] - 0s 109us/step - loss: 1.9283e-06\n", + "Epoch 236/500\n", + "6/6 [==============================] - 0s 109us/step - loss: 1.8885e-06\n", + "Epoch 237/500\n", + "6/6 [==============================] - 0s 99us/step - loss: 1.8500e-06\n", + "Epoch 238/500\n", + "6/6 [==============================] - 0s 130us/step - loss: 1.8119e-06\n", + "Epoch 239/500\n", + "6/6 [==============================] - 0s 118us/step - loss: 1.7749e-06\n", + "Epoch 240/500\n", + "6/6 [==============================] - 0s 108us/step - loss: 1.7383e-06\n", + "Epoch 241/500\n", + "6/6 [==============================] - 0s 94us/step - loss: 1.7025e-06\n", + "Epoch 242/500\n", + "6/6 [==============================] - 0s 154us/step - loss: 1.6676e-06\n", + "Epoch 243/500\n", + "6/6 [==============================] - 0s 174us/step - loss: 1.6335e-06\n", + "Epoch 244/500\n", + "6/6 [==============================] - 0s 181us/step - loss: 1.5997e-06\n", + "Epoch 245/500\n", + "6/6 [==============================] - 0s 186us/step - loss: 1.5671e-06\n", + "Epoch 246/500\n", + "6/6 [==============================] - 0s 165us/step - loss: 1.5348e-06\n", + "Epoch 247/500\n", + "6/6 [==============================] - 0s 156us/step - loss: 1.5033e-06\n", + "Epoch 248/500\n", + "6/6 [==============================] - 0s 136us/step - loss: 1.4726e-06\n", + "Epoch 249/500\n", + "6/6 [==============================] - 0s 151us/step - loss: 1.4421e-06\n", + "Epoch 250/500\n", + "6/6 [==============================] - 0s 160us/step - loss: 1.4127e-06\n", + "Epoch 251/500\n", + "6/6 [==============================] - 0s 134us/step - loss: 1.3835e-06\n", + "Epoch 252/500\n", + "6/6 [==============================] - 0s 130us/step - loss: 1.3552e-06\n", + "Epoch 253/500\n", + "6/6 [==============================] - 0s 109us/step - loss: 1.3274e-06\n", + "Epoch 254/500\n", + "6/6 [==============================] - 0s 104us/step - loss: 1.3001e-06\n", + "Epoch 255/500\n", + "6/6 [==============================] - 0s 149us/step - loss: 1.2733e-06\n", + "Epoch 256/500\n", + "6/6 [==============================] - 0s 134us/step - loss: 1.2473e-06\n", + "Epoch 257/500\n", + "6/6 [==============================] - 0s 171us/step - loss: 1.2216e-06\n", + "Epoch 258/500\n", + "6/6 [==============================] - 0s 144us/step - loss: 1.1964e-06\n", + "Epoch 259/500\n", + "6/6 [==============================] - 0s 130us/step - loss: 1.1717e-06\n", + "Epoch 260/500\n", + "6/6 [==============================] - 0s 139us/step - loss: 1.1477e-06\n", + "Epoch 261/500\n", + "6/6 [==============================] - 0s 128us/step - loss: 1.1242e-06\n", + "Epoch 262/500\n", + "6/6 [==============================] - 0s 122us/step - loss: 1.1010e-06\n", + "Epoch 263/500\n", + "6/6 [==============================] - 0s 101us/step - loss: 1.0784e-06\n", + "Epoch 264/500\n", + "6/6 [==============================] - 0s 118us/step - loss: 1.0562e-06\n", + "Epoch 265/500\n", + "6/6 [==============================] - 0s 121us/step - loss: 1.0346e-06\n", + "Epoch 266/500\n", + "6/6 [==============================] - 0s 105us/step - loss: 1.0134e-06\n", + "Epoch 267/500\n", + "6/6 [==============================] - 0s 100us/step - loss: 9.9246e-07\n", + "Epoch 268/500\n", + "6/6 [==============================] - 0s 110us/step - loss: 9.7208e-07\n", + "Epoch 269/500\n", + "6/6 [==============================] - 0s 122us/step - loss: 9.5236e-07\n", + "Epoch 270/500\n", + "6/6 [==============================] - 0s 134us/step - loss: 9.3280e-07\n", + "Epoch 271/500\n", + "6/6 [==============================] - 0s 148us/step - loss: 9.1338e-07\n", + "Epoch 272/500\n", + "6/6 [==============================] - 0s 117us/step - loss: 8.9463e-07\n", + "Epoch 273/500\n", + "6/6 [==============================] - 0s 97us/step - loss: 8.7640e-07\n", + "Epoch 274/500\n", + "6/6 [==============================] - 0s 101us/step - loss: 8.5831e-07\n", + "Epoch 275/500\n", + "6/6 [==============================] - 0s 113us/step - loss: 8.4068e-07\n", + "Epoch 276/500\n", + "6/6 [==============================] - 0s 103us/step - loss: 8.2352e-07\n", + "Epoch 277/500\n", + "6/6 [==============================] - 0s 101us/step - loss: 8.0661e-07\n", + "Epoch 278/500\n", + "6/6 [==============================] - 0s 130us/step - loss: 7.9010e-07\n", + "Epoch 279/500\n", + "6/6 [==============================] - 0s 119us/step - loss: 7.7378e-07\n", + "Epoch 280/500\n", + "6/6 [==============================] - 0s 112us/step - loss: 7.5804e-07\n", + "Epoch 281/500\n", + "6/6 [==============================] - 0s 108us/step - loss: 7.4235e-07\n", + "Epoch 282/500\n", + "6/6 [==============================] - 0s 111us/step - loss: 7.2709e-07\n", + "Epoch 283/500\n", + "6/6 [==============================] - 0s 96us/step - loss: 7.1226e-07\n", + "Epoch 284/500\n", + "6/6 [==============================] - 0s 95us/step - loss: 6.9748e-07\n", + "Epoch 285/500\n", + "6/6 [==============================] - 0s 106us/step - loss: 6.8317e-07\n", + "Epoch 286/500\n", + "6/6 [==============================] - 0s 122us/step - loss: 6.6931e-07\n", + "Epoch 287/500\n", + "6/6 [==============================] - 0s 133us/step - loss: 6.5555e-07\n", + "Epoch 288/500\n", + "6/6 [==============================] - 0s 115us/step - loss: 6.4193e-07\n", + "Epoch 289/500\n", + "6/6 [==============================] - 0s 144us/step - loss: 6.2894e-07\n", + "Epoch 290/500\n", + "6/6 [==============================] - 0s 101us/step - loss: 6.1586e-07\n", + "Epoch 291/500\n", + "6/6 [==============================] - 0s 103us/step - loss: 6.0318e-07\n", + "Epoch 292/500\n", + "6/6 [==============================] - 0s 109us/step - loss: 5.9069e-07\n", + "Epoch 293/500\n", + "6/6 [==============================] - 0s 99us/step - loss: 5.7860e-07\n", + "Epoch 294/500\n", + "6/6 [==============================] - 0s 102us/step - loss: 5.6689e-07\n", + "Epoch 295/500\n", + "6/6 [==============================] - 0s 112us/step - loss: 5.5525e-07\n", + "Epoch 296/500\n", + "6/6 [==============================] - 0s 130us/step - loss: 5.4378e-07\n", + "Epoch 297/500\n", + "6/6 [==============================] - 0s 96us/step - loss: 5.3259e-07\n", + "Epoch 298/500\n", + "6/6 [==============================] - 0s 124us/step - loss: 5.2177e-07\n", + "Epoch 299/500\n", + "6/6 [==============================] - 0s 135us/step - loss: 5.1109e-07\n", + "Epoch 300/500\n", + "6/6 [==============================] - 0s 103us/step - loss: 5.0057e-07\n", + "Epoch 301/500\n", + "6/6 [==============================] - 0s 115us/step - loss: 4.9032e-07\n", + "Epoch 302/500\n", + "6/6 [==============================] - 0s 132us/step - loss: 4.8020e-07\n", + "Epoch 303/500\n", + "6/6 [==============================] - 0s 139us/step - loss: 4.7030e-07\n", + "Epoch 304/500\n", + "6/6 [==============================] - 0s 143us/step - loss: 4.6066e-07\n", + "Epoch 305/500\n", + "6/6 [==============================] - 0s 156us/step - loss: 4.5120e-07\n", + "Epoch 306/500\n", + "6/6 [==============================] - 0s 160us/step - loss: 4.4207e-07\n", + "Epoch 307/500\n", + "6/6 [==============================] - 0s 137us/step - loss: 4.3301e-07\n", + "Epoch 308/500\n", + "6/6 [==============================] - 0s 127us/step - loss: 4.2412e-07\n", + "Epoch 309/500\n", + "6/6 [==============================] - 0s 142us/step - loss: 4.1530e-07\n", + "Epoch 310/500\n", + "6/6 [==============================] - 0s 146us/step - loss: 4.0689e-07\n", + "Epoch 311/500\n", + "6/6 [==============================] - 0s 154us/step - loss: 3.9848e-07\n", + "Epoch 312/500\n", + "6/6 [==============================] - 0s 134us/step - loss: 3.9025e-07\n", + "Epoch 313/500\n", + "6/6 [==============================] - 0s 124us/step - loss: 3.8223e-07\n", + "Epoch 314/500\n", + "6/6 [==============================] - 0s 138us/step - loss: 3.7433e-07\n", + "Epoch 315/500\n", + "6/6 [==============================] - 0s 148us/step - loss: 3.6668e-07\n", + "Epoch 316/500\n", + "6/6 [==============================] - 0s 141us/step - loss: 3.5929e-07\n", + "Epoch 317/500\n", + "6/6 [==============================] - 0s 121us/step - loss: 3.5194e-07\n", + "Epoch 318/500\n", + "6/6 [==============================] - 0s 157us/step - loss: 3.4462e-07\n", + "Epoch 319/500\n", + "6/6 [==============================] - 0s 137us/step - loss: 3.3759e-07\n", + "Epoch 320/500\n", + "6/6 [==============================] - 0s 134us/step - loss: 3.3066e-07\n", + "Epoch 321/500\n", + "6/6 [==============================] - 0s 111us/step - loss: 3.2391e-07\n", + "Epoch 322/500\n", + "6/6 [==============================] - 0s 115us/step - loss: 3.1718e-07\n", + "Epoch 323/500\n", + "6/6 [==============================] - 0s 134us/step - loss: 3.1069e-07\n", + "Epoch 324/500\n", + "6/6 [==============================] - 0s 143us/step - loss: 3.0432e-07\n", + "Epoch 325/500\n", + "6/6 [==============================] - 0s 116us/step - loss: 2.9809e-07\n", + "Epoch 326/500\n", + "6/6 [==============================] - 0s 112us/step - loss: 2.9194e-07\n", + "Epoch 327/500\n", + "6/6 [==============================] - 0s 110us/step - loss: 2.8594e-07\n", + "Epoch 328/500\n", + "6/6 [==============================] - 0s 114us/step - loss: 2.8005e-07\n", + "Epoch 329/500\n", + "6/6 [==============================] - 0s 115us/step - loss: 2.7437e-07\n", + "Epoch 330/500\n", + "6/6 [==============================] - 0s 123us/step - loss: 2.6869e-07\n", + "Epoch 331/500\n", + "6/6 [==============================] - 0s 109us/step - loss: 2.6309e-07\n", + "Epoch 332/500\n", + "6/6 [==============================] - 0s 129us/step - loss: 2.5778e-07\n", + "Epoch 333/500\n", + "6/6 [==============================] - 0s 128us/step - loss: 2.5253e-07\n", + "Epoch 334/500\n", + "6/6 [==============================] - 0s 107us/step - loss: 2.4735e-07\n", + "Epoch 335/500\n", + "6/6 [==============================] - 0s 116us/step - loss: 2.4230e-07\n", + "Epoch 336/500\n", + "6/6 [==============================] - 0s 124us/step - loss: 2.3725e-07\n", + "Epoch 337/500\n", + "6/6 [==============================] - 0s 109us/step - loss: 2.3237e-07\n", + "Epoch 338/500\n", + "6/6 [==============================] - 0s 108us/step - loss: 2.2766e-07\n", + "Epoch 339/500\n", + "6/6 [==============================] - 0s 111us/step - loss: 2.2295e-07\n", + "Epoch 340/500\n", + "6/6 [==============================] - 0s 111us/step - loss: 2.1837e-07\n", + "Epoch 341/500\n", + "6/6 [==============================] - 0s 139us/step - loss: 2.1397e-07\n", + "Epoch 342/500\n", + "6/6 [==============================] - 0s 119us/step - loss: 2.0949e-07\n", + "Epoch 343/500\n", + "6/6 [==============================] - 0s 134us/step - loss: 2.0523e-07\n", + "Epoch 344/500\n", + "6/6 [==============================] - 0s 132us/step - loss: 2.0104e-07\n", + "Epoch 345/500\n", + "6/6 [==============================] - 0s 138us/step - loss: 1.9692e-07\n", + "Epoch 346/500\n", + "6/6 [==============================] - 0s 111us/step - loss: 1.9290e-07\n", + "Epoch 347/500\n", + "6/6 [==============================] - 0s 106us/step - loss: 1.8883e-07\n", + "Epoch 348/500\n", + "6/6 [==============================] - 0s 112us/step - loss: 1.8509e-07\n", + "Epoch 349/500\n", + "6/6 [==============================] - 0s 129us/step - loss: 1.8124e-07\n", + "Epoch 350/500\n", + "6/6 [==============================] - 0s 118us/step - loss: 1.7755e-07\n", + "Epoch 351/500\n", + "6/6 [==============================] - 0s 112us/step - loss: 1.7382e-07\n", + "Epoch 352/500\n", + "6/6 [==============================] - 0s 134us/step - loss: 1.7023e-07\n", + "Epoch 353/500\n", + "6/6 [==============================] - 0s 130us/step - loss: 1.6677e-07\n", + "Epoch 354/500\n", + "6/6 [==============================] - 0s 138us/step - loss: 1.6330e-07\n", + "Epoch 355/500\n", + "6/6 [==============================] - 0s 112us/step - loss: 1.5998e-07\n", + "Epoch 356/500\n", + "6/6 [==============================] - 0s 112us/step - loss: 1.5668e-07\n", + "Epoch 357/500\n", + "6/6 [==============================] - 0s 120us/step - loss: 1.5344e-07\n", + "Epoch 358/500\n", + "6/6 [==============================] - 0s 116us/step - loss: 1.5036e-07\n", + "Epoch 359/500\n", + "6/6 [==============================] - 0s 112us/step - loss: 1.4720e-07\n", + "Epoch 360/500\n", + "6/6 [==============================] - 0s 130us/step - loss: 1.4428e-07\n", + "Epoch 361/500\n", + "6/6 [==============================] - 0s 118us/step - loss: 1.4128e-07\n", + "Epoch 362/500\n", + "6/6 [==============================] - 0s 92us/step - loss: 1.3832e-07\n", + "Epoch 363/500\n", + "6/6 [==============================] - 0s 111us/step - loss: 1.3555e-07\n", + "Epoch 364/500\n", + "6/6 [==============================] - 0s 105us/step - loss: 1.3275e-07\n", + "Epoch 365/500\n", + "6/6 [==============================] - 0s 99us/step - loss: 1.3002e-07\n", + "Epoch 366/500\n", + "6/6 [==============================] - 0s 98us/step - loss: 1.2728e-07\n", + "Epoch 367/500\n", + "6/6 [==============================] - 0s 111us/step - loss: 1.2468e-07\n", + "Epoch 368/500\n", + "6/6 [==============================] - 0s 111us/step - loss: 1.2216e-07\n", + "Epoch 369/500\n", + "6/6 [==============================] - 0s 114us/step - loss: 1.1968e-07\n", + "Epoch 370/500\n", + "6/6 [==============================] - 0s 115us/step - loss: 1.1719e-07\n", + "Epoch 371/500\n", + "6/6 [==============================] - 0s 106us/step - loss: 1.1476e-07\n", + "Epoch 372/500\n", + "6/6 [==============================] - 0s 136us/step - loss: 1.1244e-07\n", + "Epoch 373/500\n", + "6/6 [==============================] - 0s 125us/step - loss: 1.1018e-07\n", + "Epoch 374/500\n", + "6/6 [==============================] - 0s 126us/step - loss: 1.0785e-07\n", + "Epoch 375/500\n", + "6/6 [==============================] - 0s 96us/step - loss: 1.0572e-07\n", + "Epoch 376/500\n", + "6/6 [==============================] - 0s 121us/step - loss: 1.0351e-07\n", + "Epoch 377/500\n", + "6/6 [==============================] - 0s 106us/step - loss: 1.0141e-07\n", + "Epoch 378/500\n", + "6/6 [==============================] - 0s 109us/step - loss: 9.9260e-08\n", + "Epoch 379/500\n", + "6/6 [==============================] - 0s 114us/step - loss: 9.7237e-08\n", + "Epoch 380/500\n", + "6/6 [==============================] - 0s 126us/step - loss: 9.5275e-08\n", + "Epoch 381/500\n", + "6/6 [==============================] - 0s 155us/step - loss: 9.3306e-08\n", + "Epoch 382/500\n", + "6/6 [==============================] - 0s 135us/step - loss: 9.1419e-08\n", + "Epoch 383/500\n", + "6/6 [==============================] - 0s 135us/step - loss: 8.9470e-08\n", + "Epoch 384/500\n", + "6/6 [==============================] - 0s 121us/step - loss: 8.7692e-08\n", + "Epoch 385/500\n", + "6/6 [==============================] - 0s 107us/step - loss: 8.5852e-08\n", + "Epoch 386/500\n", + "6/6 [==============================] - 0s 160us/step - loss: 8.4095e-08\n", + "Epoch 387/500\n", + "6/6 [==============================] - 0s 124us/step - loss: 8.2395e-08\n", + "Epoch 388/500\n", + "6/6 [==============================] - 0s 151us/step - loss: 8.0712e-08\n", + "Epoch 389/500\n", + "6/6 [==============================] - 0s 115us/step - loss: 7.9079e-08\n", + "Epoch 390/500\n", + "6/6 [==============================] - 0s 120us/step - loss: 7.7473e-08\n", + "Epoch 391/500\n", + "6/6 [==============================] - 0s 104us/step - loss: 7.5884e-08\n", + "Epoch 392/500\n", + "6/6 [==============================] - 0s 105us/step - loss: 7.4316e-08\n", + "Epoch 393/500\n", + "6/6 [==============================] - 0s 124us/step - loss: 7.2800e-08\n", + "Epoch 394/500\n", + "6/6 [==============================] - 0s 106us/step - loss: 7.1294e-08\n", + "Epoch 395/500\n", + "6/6 [==============================] - 0s 131us/step - loss: 6.9846e-08\n", + "Epoch 396/500\n", + "6/6 [==============================] - 0s 176us/step - loss: 6.8420e-08\n", + "Epoch 397/500\n", + "6/6 [==============================] - 0s 157us/step - loss: 6.7025e-08\n", + "Epoch 398/500\n", + "6/6 [==============================] - 0s 107us/step - loss: 6.5626e-08\n", + "Epoch 399/500\n", + "6/6 [==============================] - 0s 125us/step - loss: 6.4250e-08\n", + "Epoch 400/500\n", + "6/6 [==============================] - 0s 90us/step - loss: 6.2965e-08\n", + "Epoch 401/500\n", + "6/6 [==============================] - 0s 122us/step - loss: 6.1622e-08\n", + "Epoch 402/500\n", + "6/6 [==============================] - 0s 121us/step - loss: 6.0372e-08\n", + "Epoch 403/500\n", + "6/6 [==============================] - 0s 118us/step - loss: 5.9116e-08\n", + "Epoch 404/500\n", + "6/6 [==============================] - 0s 184us/step - loss: 5.7923e-08\n", + "Epoch 405/500\n", + "6/6 [==============================] - 0s 180us/step - loss: 5.6723e-08\n", + "Epoch 406/500\n", + "6/6 [==============================] - 0s 209us/step - loss: 5.5610e-08\n", + "Epoch 407/500\n", + "6/6 [==============================] - 0s 126us/step - loss: 5.4441e-08\n", + "Epoch 408/500\n", + "6/6 [==============================] - 0s 141us/step - loss: 5.3338e-08\n", + "Epoch 409/500\n", + "6/6 [==============================] - 0s 136us/step - loss: 5.2289e-08\n", + "Epoch 410/500\n", + "6/6 [==============================] - 0s 128us/step - loss: 5.1215e-08\n", + "Epoch 411/500\n", + "6/6 [==============================] - 0s 141us/step - loss: 5.0168e-08\n", + "Epoch 412/500\n", + "6/6 [==============================] - 0s 124us/step - loss: 4.9121e-08\n", + "Epoch 413/500\n", + "6/6 [==============================] - 0s 123us/step - loss: 4.8102e-08\n", + "Epoch 414/500\n", + "6/6 [==============================] - 0s 220us/step - loss: 4.7169e-08\n", + "Epoch 415/500\n", + "6/6 [==============================] - 0s 134us/step - loss: 4.6176e-08\n", + "Epoch 416/500\n", + "6/6 [==============================] - 0s 120us/step - loss: 4.5244e-08\n", + "Epoch 417/500\n", + "6/6 [==============================] - 0s 111us/step - loss: 4.4306e-08\n", + "Epoch 418/500\n", + "6/6 [==============================] - 0s 108us/step - loss: 4.3398e-08\n", + "Epoch 419/500\n", + "6/6 [==============================] - 0s 139us/step - loss: 4.2500e-08\n", + "Epoch 420/500\n", + "6/6 [==============================] - 0s 130us/step - loss: 4.1632e-08\n", + "Epoch 421/500\n", + "6/6 [==============================] - 0s 113us/step - loss: 4.0758e-08\n", + "Epoch 422/500\n", + "6/6 [==============================] - 0s 133us/step - loss: 3.9940e-08\n", + "Epoch 423/500\n", + "6/6 [==============================] - 0s 142us/step - loss: 3.9067e-08\n", + "Epoch 424/500\n", + "6/6 [==============================] - 0s 116us/step - loss: 3.8272e-08\n", + "Epoch 425/500\n", + "6/6 [==============================] - 0s 128us/step - loss: 3.7499e-08\n", + "Epoch 426/500\n", + "6/6 [==============================] - 0s 173us/step - loss: 3.6725e-08\n", + "Epoch 427/500\n", + "6/6 [==============================] - 0s 116us/step - loss: 3.5974e-08\n", + "Epoch 428/500\n", + "6/6 [==============================] - 0s 113us/step - loss: 3.5215e-08\n", + "Epoch 429/500\n", + "6/6 [==============================] - 0s 125us/step - loss: 3.4502e-08\n", + "Epoch 430/500\n", + "6/6 [==============================] - 0s 120us/step - loss: 3.3798e-08\n", + "Epoch 431/500\n", + "6/6 [==============================] - 0s 112us/step - loss: 3.3094e-08\n", + "Epoch 432/500\n", + "6/6 [==============================] - 0s 105us/step - loss: 3.2408e-08\n", + "Epoch 433/500\n", + "6/6 [==============================] - 0s 135us/step - loss: 3.1752e-08\n", + "Epoch 434/500\n", + "6/6 [==============================] - 0s 114us/step - loss: 3.1123e-08\n", + "Epoch 435/500\n", + "6/6 [==============================] - 0s 108us/step - loss: 3.0505e-08\n", + "Epoch 436/500\n", + "6/6 [==============================] - 0s 117us/step - loss: 2.9875e-08\n", + "Epoch 437/500\n", + "6/6 [==============================] - 0s 123us/step - loss: 2.9253e-08\n", + "Epoch 438/500\n", + "6/6 [==============================] - 0s 100us/step - loss: 2.8660e-08\n", + "Epoch 439/500\n", + "6/6 [==============================] - 0s 112us/step - loss: 2.8055e-08\n", + "Epoch 440/500\n", + "6/6 [==============================] - 0s 118us/step - loss: 2.7524e-08\n", + "Epoch 441/500\n", + "6/6 [==============================] - 0s 107us/step - loss: 2.6968e-08\n", + "Epoch 442/500\n", + "6/6 [==============================] - 0s 109us/step - loss: 2.6387e-08\n", + "Epoch 443/500\n", + "6/6 [==============================] - 0s 115us/step - loss: 2.5865e-08\n", + "Epoch 444/500\n", + "6/6 [==============================] - 0s 104us/step - loss: 2.5343e-08\n", + "Epoch 445/500\n", + "6/6 [==============================] - 0s 151us/step - loss: 2.4817e-08\n", + "Epoch 446/500\n", + "6/6 [==============================] - 0s 136us/step - loss: 2.4327e-08\n", + "Epoch 447/500\n", + "6/6 [==============================] - 0s 135us/step - loss: 2.3818e-08\n", + "Epoch 448/500\n", + "6/6 [==============================] - 0s 135us/step - loss: 2.3324e-08\n", + "Epoch 449/500\n", + "6/6 [==============================] - 0s 121us/step - loss: 2.2866e-08\n", + "Epoch 450/500\n", + "6/6 [==============================] - 0s 121us/step - loss: 2.2371e-08\n", + "Epoch 451/500\n", + "6/6 [==============================] - 0s 125us/step - loss: 2.1897e-08\n", + "Epoch 452/500\n", + "6/6 [==============================] - 0s 116us/step - loss: 2.1476e-08\n", + "Epoch 453/500\n", + "6/6 [==============================] - 0s 107us/step - loss: 2.1011e-08\n", + "Epoch 454/500\n", + "6/6 [==============================] - 0s 108us/step - loss: 2.0585e-08\n", + "Epoch 455/500\n", + "6/6 [==============================] - 0s 125us/step - loss: 2.0154e-08\n", + "Epoch 456/500\n", + "6/6 [==============================] - 0s 120us/step - loss: 1.9737e-08\n", + "Epoch 457/500\n", + "6/6 [==============================] - 0s 106us/step - loss: 1.9299e-08\n", + "Epoch 458/500\n", + "6/6 [==============================] - 0s 118us/step - loss: 1.8910e-08\n", + "Epoch 459/500\n", + "6/6 [==============================] - 0s 145us/step - loss: 1.8524e-08\n", + "Epoch 460/500\n", + "6/6 [==============================] - 0s 125us/step - loss: 1.8159e-08\n", + "Epoch 461/500\n", + "6/6 [==============================] - 0s 154us/step - loss: 1.7796e-08\n", + "Epoch 462/500\n", + "6/6 [==============================] - 0s 130us/step - loss: 1.7425e-08\n", + "Epoch 463/500\n", + "6/6 [==============================] - 0s 115us/step - loss: 1.7075e-08\n", + "Epoch 464/500\n", + "6/6 [==============================] - 0s 114us/step - loss: 1.6702e-08\n", + "Epoch 465/500\n", + "6/6 [==============================] - 0s 122us/step - loss: 1.6374e-08\n", + "Epoch 466/500\n", + "6/6 [==============================] - 0s 110us/step - loss: 1.6061e-08\n", + "Epoch 467/500\n", + "6/6 [==============================] - 0s 129us/step - loss: 1.5715e-08\n", + "Epoch 468/500\n", + "6/6 [==============================] - 0s 108us/step - loss: 1.5401e-08\n", + "Epoch 469/500\n", + "6/6 [==============================] - 0s 100us/step - loss: 1.5072e-08\n", + "Epoch 470/500\n", + "6/6 [==============================] - 0s 119us/step - loss: 1.4769e-08\n", + "Epoch 471/500\n", + "6/6 [==============================] - 0s 110us/step - loss: 1.4475e-08\n", + "Epoch 472/500\n", + "6/6 [==============================] - 0s 103us/step - loss: 1.4188e-08\n", + "Epoch 473/500\n", + "6/6 [==============================] - 0s 133us/step - loss: 1.3906e-08\n", + "Epoch 474/500\n", + "6/6 [==============================] - 0s 129us/step - loss: 1.3625e-08\n", + "Epoch 475/500\n", + "6/6 [==============================] - 0s 128us/step - loss: 1.3346e-08\n", + "Epoch 476/500\n", + "6/6 [==============================] - 0s 123us/step - loss: 1.3076e-08\n", + "Epoch 477/500\n", + "6/6 [==============================] - 0s 107us/step - loss: 1.2806e-08\n", + "Epoch 478/500\n", + "6/6 [==============================] - 0s 106us/step - loss: 1.2540e-08\n", + "Epoch 479/500\n", + "6/6 [==============================] - 0s 140us/step - loss: 1.2288e-08\n", + "Epoch 480/500\n", + "6/6 [==============================] - 0s 130us/step - loss: 1.2053e-08\n", + "Epoch 481/500\n", + "6/6 [==============================] - 0s 135us/step - loss: 1.1799e-08\n", + "Epoch 482/500\n", + "6/6 [==============================] - 0s 111us/step - loss: 1.1569e-08\n", + "Epoch 483/500\n", + "6/6 [==============================] - 0s 110us/step - loss: 1.1330e-08\n", + "Epoch 484/500\n", + "6/6 [==============================] - 0s 130us/step - loss: 1.1107e-08\n", + "Epoch 485/500\n", + "6/6 [==============================] - 0s 124us/step - loss: 1.0873e-08\n", + "Epoch 486/500\n", + "6/6 [==============================] - 0s 119us/step - loss: 1.0655e-08\n", + "Epoch 487/500\n", + "6/6 [==============================] - 0s 108us/step - loss: 1.0429e-08\n", + "Epoch 488/500\n", + "6/6 [==============================] - 0s 113us/step - loss: 1.0225e-08\n", + "Epoch 489/500\n", + "6/6 [==============================] - 0s 125us/step - loss: 1.0003e-08\n", + "Epoch 490/500\n", + "6/6 [==============================] - 0s 135us/step - loss: 9.7966e-09\n", + "Epoch 491/500\n", + "6/6 [==============================] - 0s 159us/step - loss: 9.6028e-09\n", + "Epoch 492/500\n", + "6/6 [==============================] - 0s 184us/step - loss: 9.4121e-09\n", + "Epoch 493/500\n", + "6/6 [==============================] - 0s 151us/step - loss: 9.2201e-09\n", + "Epoch 494/500\n", + "6/6 [==============================] - 0s 148us/step - loss: 9.0133e-09\n", + "Epoch 495/500\n", + "6/6 [==============================] - 0s 118us/step - loss: 8.8277e-09\n", + "Epoch 496/500\n", + "6/6 [==============================] - 0s 112us/step - loss: 8.6555e-09\n", + "Epoch 497/500\n", + "6/6 [==============================] - 0s 98us/step - loss: 8.4635e-09\n", + "Epoch 498/500\n", + "6/6 [==============================] - 0s 119us/step - loss: 8.2862e-09\n", + "Epoch 499/500\n", + "6/6 [==============================] - 0s 157us/step - loss: 8.1217e-09\n", + "Epoch 500/500\n", + "6/6 [==============================] - 0s 126us/step - loss: 7.9374e-09\n" + ] + }, + { + "data": { + "text/plain": [ + "" + ] + }, + "execution_count": 5, + "metadata": { + "tags": [] + }, + "output_type": "execute_result" + } + ], + "source": [ + "model.fit(xs, ys, epochs=500)" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "colab_type": "text", + "id": "kaFIr71H2OZ-" + }, + "source": [ + "Ok, now you have a model that has been trained to learn the relationshop between X and Y. You can use the **model.predict** method to have it figure out the Y for a previously unknown X. So, for example, if X = 10, what do you think Y will be? Take a guess before you run this code:" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "colab": { + "height": 34 + }, + "colab_type": "code", + "executionInfo": { + "elapsed": 1082, + "status": "ok", + "timestamp": 1552616848824, + "user": { + "displayName": "Laurence Moroney", + "photoUrl": "https://lh3.googleusercontent.com/-RcxktLY-TBk/AAAAAAAAAAI/AAAAAAAAABY/b4V4dTIqmPI/s64/photo.jpg", + "userId": "06401446828348966425" + }, + "user_tz": -540 + }, + "id": "oxNzL4lS2Gui", + "outputId": "080c5d7a-aff6-4af2-a668-be993dd07ace" + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "[[ 31.00025749]]\n" + ] + } + ], + "source": [ + "print(model.predict([10.0]))" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "colab_type": "text", + "id": "btF2CSFH2iEX" + }, + "source": [ + "You might have thought 31, right? But it ended up being a little over. Why do you think that is? \n", + "\n", + "Remember that neural networks deal with probabilities, so given the data that we fed the NN with, it calculated that there is a very high probability that the relationship between X and Y is Y=3X+1, but with only 6 data points we can't know for sure. As a result, the result for 10 is very close to 31, but not necessarily 31. \n", + "\n", + "As you work with neural networks, you'll see this pattern recurring. You will almost always deal with probabilities, not certainties, and will do a little bit of coding to figure out what the result is based on the probabilities, particularly when it comes to classification.\n" + ] + } + ], + "metadata": { + "colab": { + "name": "Hello-ML-World.ipynb", + "provenance": [], + "toc_visible": true, + "version": "0.3.2" + }, + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.8.3" + } + }, + "nbformat": 4, + "nbformat_minor": 1 +}