{ "cells": [ { "cell_type": "markdown", "metadata": { "id": "SQddnaoYPCBb" }, "source": [ "# The 'Hello World' of neural networks" ] }, { "cell_type": "code", "execution_count": 10, "metadata": { "id": "3MKFKPpdNJpP" }, "outputs": [], "source": [ "# importando o pacote keras do python\n", "import keras" ] }, { "cell_type": "code", "execution_count": 2, "metadata": { "id": "_O6AtRPNNa1P" }, "outputs": [], "source": [ "# definindo o modelo (rede neural simples de uma camada com um neurônio)\n", "model = keras.Sequential([keras.layers.Dense(units = 1, input_shape = [1])])" ] }, { "cell_type": "code", "execution_count": 3, "metadata": { "id": "zzRLUVt4Nnn_" }, "outputs": [], "source": [ "# compilando o modelo (sgd = stochastic gradient descent)\n", "model.compile(optimizer = 'sgd', loss = 'mean_squared_error')" ] }, { "cell_type": "code", "execution_count": 4, "metadata": { "id": "JAdyYJBJNw92" }, "outputs": [], "source": [ "# importando o pacote matemático numpy\n", "import numpy as np" ] }, { "cell_type": "code", "execution_count": 5, "metadata": { "id": "0NlgKtqsNzf-" }, "outputs": [], "source": [ "# definindo os valores de x\n", "xs = np.array([-1.0, 0.0, 1.0, 2.0, 3.0, 4.0], dtype = float)" ] }, { "cell_type": "code", "execution_count": 6, "metadata": { "id": "8UQQhlfGOBmc" }, "outputs": [], "source": [ "# definindo os valores de y\n", "ys = np.array([-3.0, -1.0, 1.0, 3.0, 5.0, 7.0], dtype = float)" ] }, { "cell_type": "code", "execution_count": 7, "metadata": { "id": "tlwtVd75OShM" }, "outputs": [], "source": [ "# função modelo para os dados\n", "def true_predict(x):\n", " '''x em função de y'''\n", " y = 2 * x - 1\n", "\n", " return y" ] }, { "cell_type": "code", "execution_count": 8, "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "id": "esSesUdhOw7S", "outputId": "60d9775d-ca96-457a-8ddd-eeb1ff09eb61" }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Epoch 1/500\n", "1/1 [==============================] - 0s 435ms/step - loss: 16.4883\n", "Epoch 2/500\n", "1/1 [==============================] - 0s 3ms/step - loss: 13.2204\n", "Epoch 3/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 10.6443\n", "Epoch 4/500\n", "1/1 [==============================] - 0s 4ms/step - loss: 8.6126\n", "Epoch 5/500\n", "1/1 [==============================] - 0s 6ms/step - loss: 7.0092\n", "Epoch 6/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 5.7430\n", "Epoch 7/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 4.7421\n", "Epoch 8/500\n", "1/1 [==============================] - 0s 4ms/step - loss: 3.9500\n", "Epoch 9/500\n", "1/1 [==============================] - 0s 3ms/step - loss: 3.3224\n", "Epoch 10/500\n", "1/1 [==============================] - 0s 4ms/step - loss: 2.8241\n", "Epoch 11/500\n", "1/1 [==============================] - 0s 4ms/step - loss: 2.4278\n", "Epoch 12/500\n", "1/1 [==============================] - 0s 4ms/step - loss: 2.1118\n", "Epoch 13/500\n", "1/1 [==============================] - 0s 4ms/step - loss: 1.8591\n", "Epoch 14/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 1.6561\n", "Epoch 15/500\n", "1/1 [==============================] - 0s 4ms/step - loss: 1.4925\n", "Epoch 16/500\n", "1/1 [==============================] - 0s 4ms/step - loss: 1.3599\n", "Epoch 17/500\n", "1/1 [==============================] - 0s 4ms/step - loss: 1.2517\n", "Epoch 18/500\n", "1/1 [==============================] - 0s 4ms/step - loss: 1.1629\n", "Epoch 19/500\n", "1/1 [==============================] - 0s 4ms/step - loss: 1.0893\n", "Epoch 20/500\n", "1/1 [==============================] - 0s 4ms/step - loss: 1.0279\n", "Epoch 21/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 0.9761\n", "Epoch 22/500\n", "1/1 [==============================] - 0s 4ms/step - loss: 0.9318\n", "Epoch 23/500\n", "1/1 [==============================] - 0s 4ms/step - loss: 0.8937\n", "Epoch 24/500\n", "1/1 [==============================] - 0s 4ms/step - loss: 0.8603\n", "Epoch 25/500\n", "1/1 [==============================] - 0s 4ms/step - loss: 0.8309\n", "Epoch 26/500\n", "1/1 [==============================] - 0s 4ms/step - loss: 0.8046\n", "Epoch 27/500\n", "1/1 [==============================] - 0s 4ms/step - loss: 0.7807\n", "Epoch 28/500\n", "1/1 [==============================] - 0s 4ms/step - loss: 0.7590\n", "Epoch 29/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 0.7389\n", "Epoch 30/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 0.7201\n", "Epoch 31/500\n", "1/1 [==============================] - 0s 6ms/step - loss: 0.7026\n", "Epoch 32/500\n", "1/1 [==============================] - 0s 4ms/step - loss: 0.6859\n", "Epoch 33/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 0.6701\n", "Epoch 34/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 0.6550\n", "Epoch 35/500\n", "1/1 [==============================] - 0s 4ms/step - loss: 0.6405\n", "Epoch 36/500\n", "1/1 [==============================] - 0s 4ms/step - loss: 0.6265\n", "Epoch 37/500\n", "1/1 [==============================] - 0s 6ms/step - loss: 0.6129\n", "Epoch 38/500\n", "1/1 [==============================] - 0s 7ms/step - loss: 0.5998\n", "Epoch 39/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 0.5871\n", "Epoch 40/500\n", "1/1 [==============================] - 0s 7ms/step - loss: 0.5747\n", "Epoch 41/500\n", "1/1 [==============================] - 0s 6ms/step - loss: 0.5626\n", "Epoch 42/500\n", "1/1 [==============================] - 0s 6ms/step - loss: 0.5509\n", "Epoch 43/500\n", "1/1 [==============================] - 0s 6ms/step - loss: 0.5394\n", "Epoch 44/500\n", "1/1 [==============================] - 0s 7ms/step - loss: 0.5282\n", "Epoch 45/500\n", "1/1 [==============================] - 0s 6ms/step - loss: 0.5173\n", "Epoch 46/500\n", "1/1 [==============================] - 0s 7ms/step - loss: 0.5066\n", "Epoch 47/500\n", "1/1 [==============================] - 0s 6ms/step - loss: 0.4961\n", "Epoch 48/500\n", "1/1 [==============================] - 0s 6ms/step - loss: 0.4859\n", "Epoch 49/500\n", "1/1 [==============================] - 0s 6ms/step - loss: 0.4758\n", "Epoch 50/500\n", "1/1 [==============================] - 0s 7ms/step - loss: 0.4660\n", "Epoch 51/500\n", "1/1 [==============================] - 0s 6ms/step - loss: 0.4564\n", "Epoch 52/500\n", "1/1 [==============================] - 0s 14ms/step - loss: 0.4471\n", "Epoch 53/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 0.4379\n", "Epoch 54/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 0.4289\n", "Epoch 55/500\n", "1/1 [==============================] - 0s 6ms/step - loss: 0.4200\n", "Epoch 56/500\n", "1/1 [==============================] - 0s 6ms/step - loss: 0.4114\n", "Epoch 57/500\n", "1/1 [==============================] - 0s 7ms/step - loss: 0.4029\n", "Epoch 58/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 0.3947\n", "Epoch 59/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 0.3866\n", "Epoch 60/500\n", "1/1 [==============================] - 0s 6ms/step - loss: 0.3786\n", "Epoch 61/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 0.3708\n", "Epoch 62/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 0.3632\n", "Epoch 63/500\n", "1/1 [==============================] - 0s 6ms/step - loss: 0.3557\n", "Epoch 64/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 0.3484\n", "Epoch 65/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 0.3413\n", "Epoch 66/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 0.3343\n", "Epoch 67/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 0.3274\n", "Epoch 68/500\n", "1/1 [==============================] - 0s 6ms/step - loss: 0.3207\n", "Epoch 69/500\n", "1/1 [==============================] - 0s 6ms/step - loss: 0.3141\n", "Epoch 70/500\n", "1/1 [==============================] - 0s 6ms/step - loss: 0.3076\n", "Epoch 71/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 0.3013\n", "Epoch 72/500\n", "1/1 [==============================] - 0s 7ms/step - loss: 0.2951\n", "Epoch 73/500\n", "1/1 [==============================] - 0s 8ms/step - loss: 0.2891\n", "Epoch 74/500\n", "1/1 [==============================] - 0s 6ms/step - loss: 0.2831\n", "Epoch 75/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 0.2773\n", "Epoch 76/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 0.2716\n", "Epoch 77/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 0.2660\n", "Epoch 78/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 0.2606\n", "Epoch 79/500\n", "1/1 [==============================] - 0s 6ms/step - loss: 0.2552\n", "Epoch 80/500\n", "1/1 [==============================] - 0s 6ms/step - loss: 0.2500\n", "Epoch 81/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 0.2448\n", "Epoch 82/500\n", "1/1 [==============================] - 0s 6ms/step - loss: 0.2398\n", "Epoch 83/500\n", "1/1 [==============================] - 0s 10ms/step - loss: 0.2349\n", "Epoch 84/500\n", "1/1 [==============================] - 0s 4ms/step - loss: 0.2301\n", "Epoch 85/500\n", "1/1 [==============================] - 0s 4ms/step - loss: 0.2253\n", "Epoch 86/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 0.2207\n", "Epoch 87/500\n", "1/1 [==============================] - 0s 6ms/step - loss: 0.2162\n", "Epoch 88/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 0.2117\n", "Epoch 89/500\n", "1/1 [==============================] - 0s 4ms/step - loss: 0.2074\n", "Epoch 90/500\n", "1/1 [==============================] - 0s 4ms/step - loss: 0.2031\n", "Epoch 91/500\n", "1/1 [==============================] - 0s 8ms/step - loss: 0.1990\n", "Epoch 92/500\n", "1/1 [==============================] - 0s 4ms/step - loss: 0.1949\n", "Epoch 93/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 0.1909\n", "Epoch 94/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 0.1869\n", "Epoch 95/500\n", "1/1 [==============================] - 0s 8ms/step - loss: 0.1831\n", "Epoch 96/500\n", "1/1 [==============================] - 0s 4ms/step - loss: 0.1793\n", "Epoch 97/500\n", "1/1 [==============================] - 0s 7ms/step - loss: 0.1757\n", "Epoch 98/500\n", "1/1 [==============================] - 0s 4ms/step - loss: 0.1721\n", "Epoch 99/500\n", "1/1 [==============================] - 0s 6ms/step - loss: 0.1685\n", "Epoch 100/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 0.1651\n", "Epoch 101/500\n", "1/1 [==============================] - 0s 6ms/step - loss: 0.1617\n", "Epoch 102/500\n", "1/1 [==============================] - 0s 4ms/step - loss: 0.1583\n", "Epoch 103/500\n", "1/1 [==============================] - 0s 6ms/step - loss: 0.1551\n", "Epoch 104/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 0.1519\n", "Epoch 105/500\n", "1/1 [==============================] - 0s 6ms/step - loss: 0.1488\n", "Epoch 106/500\n", "1/1 [==============================] - 0s 4ms/step - loss: 0.1457\n", "Epoch 107/500\n", "1/1 [==============================] - 0s 6ms/step - loss: 0.1427\n", "Epoch 108/500\n", "1/1 [==============================] - 0s 10ms/step - loss: 0.1398\n", "Epoch 109/500\n", "1/1 [==============================] - 0s 6ms/step - loss: 0.1369\n", "Epoch 110/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 0.1341\n", "Epoch 111/500\n", "1/1 [==============================] - 0s 6ms/step - loss: 0.1314\n", "Epoch 112/500\n", "1/1 [==============================] - 0s 4ms/step - loss: 0.1287\n", "Epoch 113/500\n", "1/1 [==============================] - 0s 9ms/step - loss: 0.1260\n", "Epoch 114/500\n", "1/1 [==============================] - 0s 12ms/step - loss: 0.1234\n", "Epoch 115/500\n", "1/1 [==============================] - 0s 7ms/step - loss: 0.1209\n", "Epoch 116/500\n", "1/1 [==============================] - 0s 6ms/step - loss: 0.1184\n", "Epoch 117/500\n", "1/1 [==============================] - 0s 6ms/step - loss: 0.1160\n", "Epoch 118/500\n", "1/1 [==============================] - 0s 8ms/step - loss: 0.1136\n", "Epoch 119/500\n", "1/1 [==============================] - 0s 8ms/step - loss: 0.1113\n", "Epoch 120/500\n", "1/1 [==============================] - 0s 8ms/step - loss: 0.1090\n", "Epoch 121/500\n", "1/1 [==============================] - 0s 7ms/step - loss: 0.1067\n", "Epoch 122/500\n", "1/1 [==============================] - 0s 8ms/step - loss: 0.1046\n", "Epoch 123/500\n", "1/1 [==============================] - 0s 6ms/step - loss: 0.1024\n", "Epoch 124/500\n", "1/1 [==============================] - 0s 6ms/step - loss: 0.1003\n", "Epoch 125/500\n", "1/1 [==============================] - 0s 7ms/step - loss: 0.0982\n", "Epoch 126/500\n", "1/1 [==============================] - 0s 6ms/step - loss: 0.0962\n", "Epoch 127/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 0.0942\n", "Epoch 128/500\n", "1/1 [==============================] - 0s 8ms/step - loss: 0.0923\n", "Epoch 129/500\n", "1/1 [==============================] - 0s 8ms/step - loss: 0.0904\n", "Epoch 130/500\n", "1/1 [==============================] - 0s 9ms/step - loss: 0.0886\n", "Epoch 131/500\n", "1/1 [==============================] - 0s 8ms/step - loss: 0.0867\n", "Epoch 132/500\n", "1/1 [==============================] - 0s 6ms/step - loss: 0.0850\n", "Epoch 133/500\n", "1/1 [==============================] - 0s 7ms/step - loss: 0.0832\n", "Epoch 134/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 0.0815\n", "Epoch 135/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 0.0798\n", "Epoch 136/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 0.0782\n", "Epoch 137/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 0.0766\n", "Epoch 138/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 0.0750\n", "Epoch 139/500\n", "1/1 [==============================] - 0s 4ms/step - loss: 0.0735\n", "Epoch 140/500\n", "1/1 [==============================] - 0s 4ms/step - loss: 0.0720\n", "Epoch 141/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 0.0705\n", "Epoch 142/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 0.0690\n", "Epoch 143/500\n", "1/1 [==============================] - 0s 4ms/step - loss: 0.0676\n", "Epoch 144/500\n", "1/1 [==============================] - 0s 4ms/step - loss: 0.0662\n", "Epoch 145/500\n", "1/1 [==============================] - 0s 4ms/step - loss: 0.0649\n", "Epoch 146/500\n", "1/1 [==============================] - 0s 4ms/step - loss: 0.0635\n", "Epoch 147/500\n", "1/1 [==============================] - 0s 4ms/step - loss: 0.0622\n", "Epoch 148/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 0.0610\n", "Epoch 149/500\n", "1/1 [==============================] - 0s 4ms/step - loss: 0.0597\n", "Epoch 150/500\n", "1/1 [==============================] - 0s 4ms/step - loss: 0.0585\n", "Epoch 151/500\n", "1/1 [==============================] - 0s 4ms/step - loss: 0.0573\n", "Epoch 152/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 0.0561\n", "Epoch 153/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 0.0549\n", "Epoch 154/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 0.0538\n", "Epoch 155/500\n", "1/1 [==============================] - 0s 4ms/step - loss: 0.0527\n", "Epoch 156/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 0.0516\n", "Epoch 157/500\n", "1/1 [==============================] - 0s 4ms/step - loss: 0.0506\n", "Epoch 158/500\n", "1/1 [==============================] - 0s 4ms/step - loss: 0.0495\n", "Epoch 159/500\n", "1/1 [==============================] - 0s 4ms/step - loss: 0.0485\n", "Epoch 160/500\n", "1/1 [==============================] - 0s 4ms/step - loss: 0.0475\n", "Epoch 161/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 0.0465\n", "Epoch 162/500\n", "1/1 [==============================] - 0s 4ms/step - loss: 0.0456\n", "Epoch 163/500\n", "1/1 [==============================] - 0s 4ms/step - loss: 0.0446\n", "Epoch 164/500\n", "1/1 [==============================] - 0s 4ms/step - loss: 0.0437\n", "Epoch 165/500\n", "1/1 [==============================] - 0s 4ms/step - loss: 0.0428\n", "Epoch 166/500\n", "1/1 [==============================] - 0s 4ms/step - loss: 0.0420\n", "Epoch 167/500\n", "1/1 [==============================] - 0s 6ms/step - loss: 0.0411\n", "Epoch 168/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 0.0402\n", "Epoch 169/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 0.0394\n", "Epoch 170/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 0.0386\n", "Epoch 171/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 0.0378\n", "Epoch 172/500\n", "1/1 [==============================] - 0s 4ms/step - loss: 0.0370\n", "Epoch 173/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 0.0363\n", "Epoch 174/500\n", "1/1 [==============================] - 0s 4ms/step - loss: 0.0355\n", "Epoch 175/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 0.0348\n", "Epoch 176/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 0.0341\n", "Epoch 177/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 0.0334\n", "Epoch 178/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 0.0327\n", "Epoch 179/500\n", "1/1 [==============================] - 0s 6ms/step - loss: 0.0320\n", "Epoch 180/500\n", "1/1 [==============================] - 0s 6ms/step - loss: 0.0314\n", "Epoch 181/500\n", "1/1 [==============================] - 0s 4ms/step - loss: 0.0307\n", "Epoch 182/500\n", "1/1 [==============================] - 0s 4ms/step - loss: 0.0301\n", "Epoch 183/500\n", "1/1 [==============================] - 0s 4ms/step - loss: 0.0295\n", "Epoch 184/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 0.0289\n", "Epoch 185/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 0.0283\n", "Epoch 186/500\n", "1/1 [==============================] - 0s 4ms/step - loss: 0.0277\n", "Epoch 187/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 0.0271\n", "Epoch 188/500\n", "1/1 [==============================] - 0s 4ms/step - loss: 0.0266\n", "Epoch 189/500\n", "1/1 [==============================] - 0s 6ms/step - loss: 0.0260\n", "Epoch 190/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 0.0255\n", "Epoch 191/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 0.0250\n", "Epoch 192/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 0.0245\n", "Epoch 193/500\n", "1/1 [==============================] - 0s 7ms/step - loss: 0.0240\n", "Epoch 194/500\n", "1/1 [==============================] - 0s 6ms/step - loss: 0.0235\n", "Epoch 195/500\n", "1/1 [==============================] - 0s 7ms/step - loss: 0.0230\n", "Epoch 196/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 0.0225\n", "Epoch 197/500\n", "1/1 [==============================] - 0s 7ms/step - loss: 0.0220\n", "Epoch 198/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 0.0216\n", "Epoch 199/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 0.0211\n", "Epoch 200/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 0.0207\n", "Epoch 201/500\n", "1/1 [==============================] - 0s 8ms/step - loss: 0.0203\n", "Epoch 202/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 0.0199\n", "Epoch 203/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 0.0195\n", "Epoch 204/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 0.0191\n", "Epoch 205/500\n", "1/1 [==============================] - 0s 4ms/step - loss: 0.0187\n", "Epoch 206/500\n", "1/1 [==============================] - 0s 7ms/step - loss: 0.0183\n", "Epoch 207/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 0.0179\n", "Epoch 208/500\n", "1/1 [==============================] - 0s 7ms/step - loss: 0.0175\n", "Epoch 209/500\n", "1/1 [==============================] - 0s 6ms/step - loss: 0.0172\n", "Epoch 210/500\n", "1/1 [==============================] - 0s 6ms/step - loss: 0.0168\n", "Epoch 211/500\n", "1/1 [==============================] - 0s 8ms/step - loss: 0.0165\n", "Epoch 212/500\n", "1/1 [==============================] - 0s 12ms/step - loss: 0.0161\n", "Epoch 213/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 0.0158\n", "Epoch 214/500\n", "1/1 [==============================] - 0s 4ms/step - loss: 0.0155\n", "Epoch 215/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 0.0152\n", "Epoch 216/500\n", "1/1 [==============================] - 0s 6ms/step - loss: 0.0149\n", "Epoch 217/500\n", "1/1 [==============================] - 0s 9ms/step - loss: 0.0146\n", "Epoch 218/500\n", "1/1 [==============================] - 0s 11ms/step - loss: 0.0143\n", "Epoch 219/500\n", "1/1 [==============================] - 0s 8ms/step - loss: 0.0140\n", "Epoch 220/500\n", "1/1 [==============================] - 0s 8ms/step - loss: 0.0137\n", "Epoch 221/500\n", "1/1 [==============================] - 0s 8ms/step - loss: 0.0134\n", "Epoch 222/500\n", "1/1 [==============================] - 0s 6ms/step - loss: 0.0131\n", "Epoch 223/500\n", "1/1 [==============================] - 0s 3ms/step - loss: 0.0129\n", "Epoch 224/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 0.0126\n", "Epoch 225/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 0.0123\n", "Epoch 226/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 0.0121\n", "Epoch 227/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 0.0118\n", "Epoch 228/500\n", "1/1 [==============================] - 0s 7ms/step - loss: 0.0116\n", "Epoch 229/500\n", "1/1 [==============================] - 0s 6ms/step - loss: 0.0113\n", "Epoch 230/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 0.0111\n", "Epoch 231/500\n", "1/1 [==============================] - 0s 6ms/step - loss: 0.0109\n", "Epoch 232/500\n", "1/1 [==============================] - 0s 10ms/step - loss: 0.0107\n", "Epoch 233/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 0.0104\n", "Epoch 234/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 0.0102\n", "Epoch 235/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 0.0100\n", "Epoch 236/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 0.0098\n", "Epoch 237/500\n", "1/1 [==============================] - 0s 4ms/step - loss: 0.0096\n", "Epoch 238/500\n", "1/1 [==============================] - 0s 4ms/step - loss: 0.0094\n", "Epoch 239/500\n", "1/1 [==============================] - 0s 4ms/step - loss: 0.0092\n", "Epoch 240/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 0.0090\n", "Epoch 241/500\n", "1/1 [==============================] - 0s 4ms/step - loss: 0.0088\n", "Epoch 242/500\n", "1/1 [==============================] - 0s 4ms/step - loss: 0.0087\n", "Epoch 243/500\n", "1/1 [==============================] - 0s 4ms/step - loss: 0.0085\n", "Epoch 244/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 0.0083\n", "Epoch 245/500\n", "1/1 [==============================] - 0s 4ms/step - loss: 0.0081\n", "Epoch 246/500\n", "1/1 [==============================] - 0s 4ms/step - loss: 0.0080\n", "Epoch 247/500\n", "1/1 [==============================] - 0s 4ms/step - loss: 0.0078\n", "Epoch 248/500\n", "1/1 [==============================] - 0s 4ms/step - loss: 0.0076\n", "Epoch 249/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 0.0075\n", "Epoch 250/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 0.0073\n", "Epoch 251/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 0.0072\n", "Epoch 252/500\n", "1/1 [==============================] - 0s 4ms/step - loss: 0.0070\n", "Epoch 253/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 0.0069\n", "Epoch 254/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 0.0068\n", "Epoch 255/500\n", "1/1 [==============================] - 0s 6ms/step - loss: 0.0066\n", "Epoch 256/500\n", "1/1 [==============================] - 0s 4ms/step - loss: 0.0065\n", "Epoch 257/500\n", "1/1 [==============================] - 0s 4ms/step - loss: 0.0063\n", "Epoch 258/500\n", "1/1 [==============================] - 0s 4ms/step - loss: 0.0062\n", "Epoch 259/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 0.0061\n", "Epoch 260/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 0.0060\n", "Epoch 261/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 0.0058\n", "Epoch 262/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 0.0057\n", "Epoch 263/500\n", "1/1 [==============================] - 0s 6ms/step - loss: 0.0056\n", "Epoch 264/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 0.0055\n", "Epoch 265/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 0.0054\n", "Epoch 266/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 0.0053\n", "Epoch 267/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 0.0052\n", "Epoch 268/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 0.0051\n", "Epoch 269/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 0.0049\n", "Epoch 270/500\n", "1/1 [==============================] - 0s 6ms/step - loss: 0.0048\n", "Epoch 271/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 0.0047\n", "Epoch 272/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 0.0046\n", "Epoch 273/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 0.0046\n", "Epoch 274/500\n", "1/1 [==============================] - 0s 4ms/step - loss: 0.0045\n", "Epoch 275/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 0.0044\n", "Epoch 276/500\n", "1/1 [==============================] - 0s 7ms/step - loss: 0.0043\n", "Epoch 277/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 0.0042\n", "Epoch 278/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 0.0041\n", "Epoch 279/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 0.0040\n", "Epoch 280/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 0.0039\n", "Epoch 281/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 0.0039\n", "Epoch 282/500\n", "1/1 [==============================] - 0s 6ms/step - loss: 0.0038\n", "Epoch 283/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 0.0037\n", "Epoch 284/500\n", "1/1 [==============================] - 0s 4ms/step - loss: 0.0036\n", "Epoch 285/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 0.0035\n", "Epoch 286/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 0.0035\n", "Epoch 287/500\n", "1/1 [==============================] - 0s 7ms/step - loss: 0.0034\n", "Epoch 288/500\n", "1/1 [==============================] - 0s 9ms/step - loss: 0.0033\n", "Epoch 289/500\n", "1/1 [==============================] - 0s 13ms/step - loss: 0.0033\n", "Epoch 290/500\n", "1/1 [==============================] - 0s 8ms/step - loss: 0.0032\n", "Epoch 291/500\n", "1/1 [==============================] - 0s 8ms/step - loss: 0.0031\n", "Epoch 292/500\n", "1/1 [==============================] - 0s 4ms/step - loss: 0.0031\n", "Epoch 293/500\n", "1/1 [==============================] - 0s 4ms/step - loss: 0.0030\n", "Epoch 294/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 0.0029\n", "Epoch 295/500\n", "1/1 [==============================] - 0s 8ms/step - loss: 0.0029\n", "Epoch 296/500\n", "1/1 [==============================] - 0s 4ms/step - loss: 0.0028\n", "Epoch 297/500\n", "1/1 [==============================] - 0s 8ms/step - loss: 0.0028\n", "Epoch 298/500\n", "1/1 [==============================] - 0s 4ms/step - loss: 0.0027\n", "Epoch 299/500\n", "1/1 [==============================] - 0s 6ms/step - loss: 0.0027\n", "Epoch 300/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 0.0026\n", "Epoch 301/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 0.0025\n", "Epoch 302/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 0.0025\n", "Epoch 303/500\n", "1/1 [==============================] - 0s 4ms/step - loss: 0.0024\n", "Epoch 304/500\n", "1/1 [==============================] - 0s 6ms/step - loss: 0.0024\n", "Epoch 305/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 0.0023\n", "Epoch 306/500\n", "1/1 [==============================] - 0s 6ms/step - loss: 0.0023\n", "Epoch 307/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 0.0022\n", "Epoch 308/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 0.0022\n", "Epoch 309/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 0.0022\n", "Epoch 310/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 0.0021\n", "Epoch 311/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 0.0021\n", "Epoch 312/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 0.0020\n", "Epoch 313/500\n", "1/1 [==============================] - 0s 16ms/step - loss: 0.0020\n", "Epoch 314/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 0.0019\n", "Epoch 315/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 0.0019\n", "Epoch 316/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 0.0019\n", "Epoch 317/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 0.0018\n", "Epoch 318/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 0.0018\n", "Epoch 319/500\n", "1/1 [==============================] - 0s 4ms/step - loss: 0.0018\n", "Epoch 320/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 0.0017\n", "Epoch 321/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 0.0017\n", "Epoch 322/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 0.0016\n", "Epoch 323/500\n", "1/1 [==============================] - 0s 3ms/step - loss: 0.0016\n", "Epoch 324/500\n", "1/1 [==============================] - 0s 4ms/step - loss: 0.0016\n", "Epoch 325/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 0.0015\n", "Epoch 326/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 0.0015\n", "Epoch 327/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 0.0015\n", "Epoch 328/500\n", "1/1 [==============================] - 0s 8ms/step - loss: 0.0015\n", "Epoch 329/500\n", "1/1 [==============================] - 0s 6ms/step - loss: 0.0014\n", "Epoch 330/500\n", "1/1 [==============================] - 0s 6ms/step - loss: 0.0014\n", "Epoch 331/500\n", "1/1 [==============================] - 0s 4ms/step - loss: 0.0014\n", "Epoch 332/500\n", "1/1 [==============================] - 0s 4ms/step - loss: 0.0013\n", "Epoch 333/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 0.0013\n", "Epoch 334/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 0.0013\n", "Epoch 335/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 0.0013\n", "Epoch 336/500\n", "1/1 [==============================] - 0s 4ms/step - loss: 0.0012\n", "Epoch 337/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 0.0012\n", "Epoch 338/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 0.0012\n", "Epoch 339/500\n", "1/1 [==============================] - 0s 4ms/step - loss: 0.0012\n", "Epoch 340/500\n", "1/1 [==============================] - 0s 4ms/step - loss: 0.0011\n", "Epoch 341/500\n", "1/1 [==============================] - 0s 4ms/step - loss: 0.0011\n", "Epoch 342/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 0.0011\n", "Epoch 343/500\n", "1/1 [==============================] - 0s 10ms/step - loss: 0.0011\n", "Epoch 344/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 0.0010\n", "Epoch 345/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 0.0010\n", "Epoch 346/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 0.0010\n", "Epoch 347/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 9.8012e-04\n", "Epoch 348/500\n", "1/1 [==============================] - 0s 7ms/step - loss: 9.6000e-04\n", "Epoch 349/500\n", "1/1 [==============================] - 0s 6ms/step - loss: 9.4027e-04\n", "Epoch 350/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 9.2096e-04\n", "Epoch 351/500\n", "1/1 [==============================] - 0s 6ms/step - loss: 9.0204e-04\n", "Epoch 352/500\n", "1/1 [==============================] - 0s 9ms/step - loss: 8.8351e-04\n", "Epoch 353/500\n", "1/1 [==============================] - 0s 6ms/step - loss: 8.6537e-04\n", "Epoch 354/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 8.4759e-04\n", "Epoch 355/500\n", "1/1 [==============================] - 0s 6ms/step - loss: 8.3018e-04\n", "Epoch 356/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 8.1313e-04\n", "Epoch 357/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 7.9643e-04\n", "Epoch 358/500\n", "1/1 [==============================] - 0s 6ms/step - loss: 7.8007e-04\n", "Epoch 359/500\n", "1/1 [==============================] - 0s 16ms/step - loss: 7.6404e-04\n", "Epoch 360/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 7.4835e-04\n", "Epoch 361/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 7.3298e-04\n", "Epoch 362/500\n", "1/1 [==============================] - 0s 6ms/step - loss: 7.1792e-04\n", "Epoch 363/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 7.0318e-04\n", "Epoch 364/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 6.8874e-04\n", "Epoch 365/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 6.7459e-04\n", "Epoch 366/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 6.6073e-04\n", "Epoch 367/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 6.4716e-04\n", "Epoch 368/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 6.3387e-04\n", "Epoch 369/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 6.2085e-04\n", "Epoch 370/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 6.0810e-04\n", "Epoch 371/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 5.9560e-04\n", "Epoch 372/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 5.8337e-04\n", "Epoch 373/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 5.7139e-04\n", "Epoch 374/500\n", "1/1 [==============================] - 0s 4ms/step - loss: 5.5965e-04\n", "Epoch 375/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 5.4815e-04\n", "Epoch 376/500\n", "1/1 [==============================] - 0s 6ms/step - loss: 5.3689e-04\n", "Epoch 377/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 5.2587e-04\n", "Epoch 378/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 5.1506e-04\n", "Epoch 379/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 5.0449e-04\n", "Epoch 380/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 4.9412e-04\n", "Epoch 381/500\n", "1/1 [==============================] - 0s 8ms/step - loss: 4.8397e-04\n", "Epoch 382/500\n", "1/1 [==============================] - 0s 8ms/step - loss: 4.7403e-04\n", "Epoch 383/500\n", "1/1 [==============================] - 0s 7ms/step - loss: 4.6430e-04\n", "Epoch 384/500\n", "1/1 [==============================] - 0s 18ms/step - loss: 4.5476e-04\n", "Epoch 385/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 4.4542e-04\n", "Epoch 386/500\n", "1/1 [==============================] - 0s 6ms/step - loss: 4.3627e-04\n", "Epoch 387/500\n", "1/1 [==============================] - 0s 7ms/step - loss: 4.2731e-04\n", "Epoch 388/500\n", "1/1 [==============================] - 0s 6ms/step - loss: 4.1853e-04\n", "Epoch 389/500\n", "1/1 [==============================] - 0s 6ms/step - loss: 4.0993e-04\n", "Epoch 390/500\n", "1/1 [==============================] - 0s 6ms/step - loss: 4.0151e-04\n", "Epoch 391/500\n", "1/1 [==============================] - 0s 7ms/step - loss: 3.9327e-04\n", "Epoch 392/500\n", "1/1 [==============================] - 0s 7ms/step - loss: 3.8519e-04\n", "Epoch 393/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 3.7728e-04\n", "Epoch 394/500\n", "1/1 [==============================] - 0s 6ms/step - loss: 3.6953e-04\n", "Epoch 395/500\n", "1/1 [==============================] - 0s 7ms/step - loss: 3.6194e-04\n", "Epoch 396/500\n", "1/1 [==============================] - 0s 6ms/step - loss: 3.5450e-04\n", "Epoch 397/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 3.4722e-04\n", "Epoch 398/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 3.4009e-04\n", "Epoch 399/500\n", "1/1 [==============================] - 0s 10ms/step - loss: 3.3311e-04\n", "Epoch 400/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 3.2626e-04\n", "Epoch 401/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 3.1956e-04\n", "Epoch 402/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 3.1300e-04\n", "Epoch 403/500\n", "1/1 [==============================] - 0s 6ms/step - loss: 3.0657e-04\n", "Epoch 404/500\n", "1/1 [==============================] - 0s 10ms/step - loss: 3.0027e-04\n", "Epoch 405/500\n", "1/1 [==============================] - 0s 6ms/step - loss: 2.9410e-04\n", "Epoch 406/500\n", "1/1 [==============================] - 0s 9ms/step - loss: 2.8806e-04\n", "Epoch 407/500\n", "1/1 [==============================] - 0s 4ms/step - loss: 2.8214e-04\n", "Epoch 408/500\n", "1/1 [==============================] - 0s 6ms/step - loss: 2.7635e-04\n", "Epoch 409/500\n", "1/1 [==============================] - 0s 6ms/step - loss: 2.7067e-04\n", "Epoch 410/500\n", "1/1 [==============================] - 0s 6ms/step - loss: 2.6511e-04\n", "Epoch 411/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 2.5967e-04\n", "Epoch 412/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 2.5434e-04\n", "Epoch 413/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 2.4911e-04\n", "Epoch 414/500\n", "1/1 [==============================] - 0s 7ms/step - loss: 2.4399e-04\n", "Epoch 415/500\n", "1/1 [==============================] - 0s 6ms/step - loss: 2.3898e-04\n", "Epoch 416/500\n", "1/1 [==============================] - 0s 6ms/step - loss: 2.3407e-04\n", "Epoch 417/500\n", "1/1 [==============================] - 0s 14ms/step - loss: 2.2926e-04\n", "Epoch 418/500\n", "1/1 [==============================] - 0s 6ms/step - loss: 2.2456e-04\n", "Epoch 419/500\n", "1/1 [==============================] - 0s 18ms/step - loss: 2.1994e-04\n", "Epoch 420/500\n", "1/1 [==============================] - 0s 9ms/step - loss: 2.1543e-04\n", "Epoch 421/500\n", "1/1 [==============================] - 0s 4ms/step - loss: 2.1100e-04\n", "Epoch 422/500\n", "1/1 [==============================] - 0s 7ms/step - loss: 2.0666e-04\n", "Epoch 423/500\n", "1/1 [==============================] - 0s 8ms/step - loss: 2.0242e-04\n", "Epoch 424/500\n", "1/1 [==============================] - 0s 13ms/step - loss: 1.9826e-04\n", "Epoch 425/500\n", "1/1 [==============================] - 0s 14ms/step - loss: 1.9419e-04\n", "Epoch 426/500\n", "1/1 [==============================] - 0s 16ms/step - loss: 1.9020e-04\n", "Epoch 427/500\n", "1/1 [==============================] - 0s 16ms/step - loss: 1.8630e-04\n", "Epoch 428/500\n", "1/1 [==============================] - 0s 7ms/step - loss: 1.8247e-04\n", "Epoch 429/500\n", "1/1 [==============================] - 0s 6ms/step - loss: 1.7872e-04\n", "Epoch 430/500\n", "1/1 [==============================] - 0s 6ms/step - loss: 1.7505e-04\n", "Epoch 431/500\n", "1/1 [==============================] - 0s 9ms/step - loss: 1.7145e-04\n", "Epoch 432/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 1.6793e-04\n", "Epoch 433/500\n", "1/1 [==============================] - 0s 11ms/step - loss: 1.6448e-04\n", "Epoch 434/500\n", "1/1 [==============================] - 0s 20ms/step - loss: 1.6110e-04\n", "Epoch 435/500\n", "1/1 [==============================] - 0s 15ms/step - loss: 1.5779e-04\n", "Epoch 436/500\n", "1/1 [==============================] - 0s 12ms/step - loss: 1.5455e-04\n", "Epoch 437/500\n", "1/1 [==============================] - 0s 15ms/step - loss: 1.5138e-04\n", "Epoch 438/500\n", "1/1 [==============================] - 0s 11ms/step - loss: 1.4827e-04\n", "Epoch 439/500\n", "1/1 [==============================] - 0s 8ms/step - loss: 1.4522e-04\n", "Epoch 440/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 1.4224e-04\n", "Epoch 441/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 1.3932e-04\n", "Epoch 442/500\n", "1/1 [==============================] - 0s 4ms/step - loss: 1.3646e-04\n", "Epoch 443/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 1.3365e-04\n", "Epoch 444/500\n", "1/1 [==============================] - 0s 12ms/step - loss: 1.3091e-04\n", "Epoch 445/500\n", "1/1 [==============================] - 0s 8ms/step - loss: 1.2822e-04\n", "Epoch 446/500\n", "1/1 [==============================] - 0s 25ms/step - loss: 1.2559e-04\n", "Epoch 447/500\n", "1/1 [==============================] - 0s 17ms/step - loss: 1.2301e-04\n", "Epoch 448/500\n", "1/1 [==============================] - 0s 4ms/step - loss: 1.2048e-04\n", "Epoch 449/500\n", "1/1 [==============================] - 0s 4ms/step - loss: 1.1800e-04\n", "Epoch 450/500\n", "1/1 [==============================] - 0s 6ms/step - loss: 1.1558e-04\n", "Epoch 451/500\n", "1/1 [==============================] - 0s 16ms/step - loss: 1.1321e-04\n", "Epoch 452/500\n", "1/1 [==============================] - 0s 10ms/step - loss: 1.1088e-04\n", "Epoch 453/500\n", "1/1 [==============================] - 0s 16ms/step - loss: 1.0860e-04\n", "Epoch 454/500\n", "1/1 [==============================] - 0s 15ms/step - loss: 1.0637e-04\n", "Epoch 455/500\n", "1/1 [==============================] - 0s 4ms/step - loss: 1.0419e-04\n", "Epoch 456/500\n", "1/1 [==============================] - 0s 15ms/step - loss: 1.0205e-04\n", "Epoch 457/500\n", "1/1 [==============================] - 0s 10ms/step - loss: 9.9953e-05\n", "Epoch 458/500\n", "1/1 [==============================] - 0s 11ms/step - loss: 9.7899e-05\n", "Epoch 459/500\n", "1/1 [==============================] - 0s 8ms/step - loss: 9.5887e-05\n", "Epoch 460/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 9.3919e-05\n", "Epoch 461/500\n", "1/1 [==============================] - 0s 6ms/step - loss: 9.1988e-05\n", "Epoch 462/500\n", "1/1 [==============================] - 0s 6ms/step - loss: 9.0098e-05\n", "Epoch 463/500\n", "1/1 [==============================] - 0s 6ms/step - loss: 8.8247e-05\n", "Epoch 464/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 8.6435e-05\n", "Epoch 465/500\n", "1/1 [==============================] - 0s 4ms/step - loss: 8.4660e-05\n", "Epoch 466/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 8.2921e-05\n", "Epoch 467/500\n", "1/1 [==============================] - 0s 4ms/step - loss: 8.1218e-05\n", "Epoch 468/500\n", "1/1 [==============================] - 0s 4ms/step - loss: 7.9550e-05\n", "Epoch 469/500\n", "1/1 [==============================] - 0s 4ms/step - loss: 7.7916e-05\n", "Epoch 470/500\n", "1/1 [==============================] - 0s 7ms/step - loss: 7.6316e-05\n", "Epoch 471/500\n", "1/1 [==============================] - 0s 4ms/step - loss: 7.4748e-05\n", "Epoch 472/500\n", "1/1 [==============================] - 0s 3ms/step - loss: 7.3212e-05\n", "Epoch 473/500\n", "1/1 [==============================] - 0s 11ms/step - loss: 7.1709e-05\n", "Epoch 474/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 7.0237e-05\n", "Epoch 475/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 6.8793e-05\n", "Epoch 476/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 6.7380e-05\n", "Epoch 477/500\n", "1/1 [==============================] - 0s 4ms/step - loss: 6.5997e-05\n", "Epoch 478/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 6.4640e-05\n", "Epoch 479/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 6.3313e-05\n", "Epoch 480/500\n", "1/1 [==============================] - 0s 3ms/step - loss: 6.2012e-05\n", "Epoch 481/500\n", "1/1 [==============================] - 0s 4ms/step - loss: 6.0739e-05\n", "Epoch 482/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 5.9491e-05\n", "Epoch 483/500\n", "1/1 [==============================] - 0s 4ms/step - loss: 5.8269e-05\n", "Epoch 484/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 5.7072e-05\n", "Epoch 485/500\n", "1/1 [==============================] - 0s 4ms/step - loss: 5.5900e-05\n", "Epoch 486/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 5.4751e-05\n", "Epoch 487/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 5.3627e-05\n", "Epoch 488/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 5.2525e-05\n", "Epoch 489/500\n", "1/1 [==============================] - 0s 4ms/step - loss: 5.1447e-05\n", "Epoch 490/500\n", "1/1 [==============================] - 0s 3ms/step - loss: 5.0390e-05\n", "Epoch 491/500\n", "1/1 [==============================] - 0s 5ms/step - loss: 4.9355e-05\n", "Epoch 492/500\n", "1/1 [==============================] - 0s 6ms/step - loss: 4.8341e-05\n", "Epoch 493/500\n", "1/1 [==============================] - 0s 14ms/step - loss: 4.7347e-05\n", "Epoch 494/500\n", "1/1 [==============================] - 0s 7ms/step - loss: 4.6374e-05\n", "Epoch 495/500\n", "1/1 [==============================] - 0s 7ms/step - loss: 4.5423e-05\n", "Epoch 496/500\n", "1/1 [==============================] - 0s 8ms/step - loss: 4.4490e-05\n", "Epoch 497/500\n", "1/1 [==============================] - 0s 8ms/step - loss: 4.3576e-05\n", "Epoch 498/500\n", "1/1 [==============================] - 0s 8ms/step - loss: 4.2681e-05\n", "Epoch 499/500\n", "1/1 [==============================] - 0s 6ms/step - loss: 4.1803e-05\n", "Epoch 500/500\n", "1/1 [==============================] - 0s 8ms/step - loss: 4.0946e-05\n" ] }, { "data": { "text/plain": [ "" ] }, "execution_count": 8, "metadata": { "tags": [] }, "output_type": "execute_result" } ], "source": [ "# ensinando a rede neural a prever a função y = 2*x - 1\n", "model.fit(xs, ys, epochs = 500)" ] }, { "cell_type": "code", "execution_count": 9, "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "id": "IDOP50J1O5Px", "outputId": "dfd37ac6-a819-41f1-fe6a-8c9b826aa84e" }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "[[18.98133]]\n", "19\n" ] } ], "source": [ "# testando e comparando a capacidade de predição da rede\n", "print(model.predict([10]))\n", "print(true_predict(10))" ] } ], "metadata": { "colab": { "name": "The 'Hello World' of neural networks.ipynb", "provenance": [] }, "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.7" } }, "nbformat": 4, "nbformat_minor": 1 }