{"nbformat":4,"nbformat_minor":0,"metadata":{"kernelspec":{"display_name":"session1","language":"python","name":"session1"},"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.2"},"colab":{"name":"Session 2 - Instructor.ipynb","provenance":[]}},"cells":[{"cell_type":"markdown","metadata":{"id":"Swv3zyDf57iv"},"source":["# Session 2 - Introduction into Neural Networks\n","\n","## Lesson Objective\n","\n","The objective of this notebook is provide an overview into neural networks.\n","\n","This notebook uses kaggle's [titanic dataset](https://www.kaggle.com/c/titanic), one of the more popular datsets for individuals venturing into data science."]},{"cell_type":"code","metadata":{"id":"DALXk7p66z1o","executionInfo":{"status":"ok","timestamp":1601383942171,"user_tz":-480,"elapsed":33660,"user":{"displayName":"Jin Jun Jway","photoUrl":"","userId":"02417309841025273729"}},"outputId":"58ee2936-2e80-438b-9d9b-341dbd1a9d19","colab":{"base_uri":"https://localhost:8080/","height":34}},"source":["# mount project for titanic\n","from google.colab import drive\n","drive.mount('/content/drive/')"],"execution_count":5,"outputs":[{"output_type":"stream","text":["Mounted at /content/drive/\n"],"name":"stdout"}]},{"cell_type":"code","metadata":{"id":"adEJKo3u623o","executionInfo":{"status":"ok","timestamp":1601383947396,"user_tz":-480,"elapsed":4161,"user":{"displayName":"Jin Jun Jway","photoUrl":"","userId":"02417309841025273729"}},"outputId":"492b12b0-fc6f-4627-d41e-25a325e092d9","colab":{"base_uri":"https://localhost:8080/","height":69}},"source":["# change directory to root of project\n","%cd \"drive/My Drive/robocomp/session2\"\n","%ls"],"execution_count":6,"outputs":[{"output_type":"stream","text":["/content/drive/My Drive/robocomp/session2\n"," \u001b[0m\u001b[01;34mdata\u001b[0m/ 'Session 2 - Instructor.ipynb' \u001b[01;34mtools\u001b[0m/\n"," mlp_model.h5 'Session 2.ipynb'\n"],"name":"stdout"}]},{"cell_type":"markdown","metadata":{"id":"GFj1CNGK57iy"},"source":["## 1.0 Context\n","\n","### Taken from Kaggle Description\n","\n","\"This is the legendary Titanic ML competition – the best, first challenge for you to dive into ML competitions and familiarize yourself with how the Kaggle platform works.\n","\n","The competition is simple: use machine learning to create a model that predicts which passengers survived the Titanic shipwreck.\"\n","\n","### Data Dictionary\n","\n","Data dictionaries provides a description of the available dataset. It is good to go through the individual features to understand what each individual features represent and how they may be used to solve the problem.\n","\n","| Variable | Definition | Key |\n","|----------|--------------------------------------------|------------------------------------------------|\n","| survival | Survival | 0 = No, 1 = Yes |\n","| pclass | Ticket class | 1 = 1st, 2 = 2nd, 3 = 3rd |\n","| sex | Sex | |\n","| Age | Age in years | |\n","| sibsp | # of siblings / spouses aboard the Titanic | |\n","| parch | # of parents / children aboard the Titanic | |\n","| ticket | Ticket number | |\n","| fare | Passenger fare | |\n","| cabin | Cabin number | |\n","| embarked | Port of Embarkation | C = Cherbourg, Q = Queenstown, S = Southampton |\n","\n","- **pclass**: A proxy for socio-economic status (SES) 1st = Upper 2nd = Middle 3rd = Lower\n","\n","- **age**: Age is fractional if less than 1. If the age is estimated, it is in the form of xx.5\n","\n","- **sibsp**: The dataset defines family relations in this way… Sibling = brother, sister, stepbrother, stepsister Spouse = husband, wife (mistresses and fiancés were ignored)\n","\n","- **parch**: The dataset defines family relations in this way… Parent = mother, father Child = daughter, son, stepdaughter, stepson Some children travelled only with a nanny, therefore parch=0 for them."]},{"cell_type":"markdown","metadata":{"id":"S3BdXKnC57i0"},"source":["## 2.0 Single Neuron Model\n","\n","A single neuron can be trained to recognise the following mathematical relationship.\n","\n","y = 2x + 0.5"]},{"cell_type":"markdown","metadata":{"id":"uLKFjzeu57i1"},"source":["### 2.1 Training a Single Neuron"]},{"cell_type":"code","metadata":{"id":"hF_qMT5-57i3","executionInfo":{"status":"ok","timestamp":1601383947397,"user_tz":-480,"elapsed":2237,"user":{"displayName":"Jin Jun Jway","photoUrl":"","userId":"02417309841025273729"}}},"source":["import tensorflow as tf\n","import numpy as np\n","import pandas as pd\n","from tensorflow import keras\n","from tensorflow.keras.layers import Dense"],"execution_count":7,"outputs":[]},{"cell_type":"code","metadata":{"id":"m29fuAbq57jE","executionInfo":{"status":"ok","timestamp":1601383953031,"user_tz":-480,"elapsed":7693,"user":{"displayName":"Jin Jun Jway","photoUrl":"","userId":"02417309841025273729"}},"outputId":"e40c825b-b534-4eb7-f83f-8343a66e888e","colab":{"base_uri":"https://localhost:8080/","height":1000}},"source":["# initialise data\n","x = np.array([0.0, 1.0, 2.0, 3.0])\n","y = np.array([0.5, 2.5, 4.5, 6.5])\n","\n","# initialise models\n","model = tf.keras.Sequential([keras.layers.Dense(units=1, input_shape=[1])])\n","model.compile(optimizer='sgd', loss='mean_squared_error')\n","\n","# train model\n","model.fit(x, y, epochs=500)"],"execution_count":8,"outputs":[{"output_type":"stream","text":["Epoch 1/500\n","1/1 [==============================] - 0s 2ms/step - loss: 31.0700\n","Epoch 2/500\n","1/1 [==============================] - 0s 2ms/step - loss: 26.0894\n","Epoch 3/500\n","1/1 [==============================] - 0s 2ms/step - loss: 21.9107\n","Epoch 4/500\n","1/1 [==============================] - 0s 2ms/step - loss: 18.4046\n","Epoch 5/500\n","1/1 [==============================] - 0s 3ms/step - loss: 15.4628\n","Epoch 6/500\n","1/1 [==============================] - 0s 2ms/step - loss: 12.9945\n","Epoch 7/500\n","1/1 [==============================] - 0s 2ms/step - loss: 10.9235\n","Epoch 8/500\n","1/1 [==============================] - 0s 2ms/step - loss: 9.1857\n","Epoch 9/500\n","1/1 [==============================] - 0s 3ms/step - loss: 7.7275\n","Epoch 10/500\n","1/1 [==============================] - 0s 2ms/step - loss: 6.5039\n","Epoch 11/500\n","1/1 [==============================] - 0s 2ms/step - loss: 5.4771\n","Epoch 12/500\n","1/1 [==============================] - 0s 2ms/step - loss: 4.6154\n","Epoch 13/500\n","1/1 [==============================] - 0s 2ms/step - loss: 3.8922\n","Epoch 14/500\n","1/1 [==============================] - 0s 3ms/step - loss: 3.2852\n","Epoch 15/500\n","1/1 [==============================] - 0s 3ms/step - loss: 2.7758\n","Epoch 16/500\n","1/1 [==============================] - 0s 3ms/step - loss: 2.3482\n","Epoch 17/500\n","1/1 [==============================] - 0s 4ms/step - loss: 1.9892\n","Epoch 18/500\n","1/1 [==============================] - 0s 3ms/step - loss: 1.6877\n","Epoch 19/500\n","1/1 [==============================] - 0s 3ms/step - loss: 1.4346\n","Epoch 20/500\n","1/1 [==============================] - 0s 3ms/step - loss: 1.2221\n","Epoch 21/500\n","1/1 [==============================] - 0s 2ms/step - loss: 1.0435\n","Epoch 22/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.8935\n","Epoch 23/500\n","1/1 [==============================] - 0s 3ms/step - loss: 0.7674\n","Epoch 24/500\n","1/1 [==============================] - 0s 3ms/step - loss: 0.6614\n","Epoch 25/500\n","1/1 [==============================] - 0s 3ms/step - loss: 0.5723\n","Epoch 26/500\n","1/1 [==============================] - 0s 4ms/step - loss: 0.4973\n","Epoch 27/500\n","1/1 [==============================] - 0s 3ms/step - loss: 0.4342\n","Epoch 28/500\n","1/1 [==============================] - 0s 5ms/step - loss: 0.3811\n","Epoch 29/500\n","1/1 [==============================] - 0s 3ms/step - loss: 0.3363\n","Epoch 30/500\n","1/1 [==============================] - 0s 4ms/step - loss: 0.2985\n","Epoch 31/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.2667\n","Epoch 32/500\n","1/1 [==============================] - 0s 3ms/step - loss: 0.2397\n","Epoch 33/500\n","1/1 [==============================] - 0s 3ms/step - loss: 0.2169\n","Epoch 34/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.1976\n","Epoch 35/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.1812\n","Epoch 36/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.1673\n","Epoch 37/500\n","1/1 [==============================] - 0s 3ms/step - loss: 0.1554\n","Epoch 38/500\n","1/1 [==============================] - 0s 3ms/step - loss: 0.1453\n","Epoch 39/500\n","1/1 [==============================] - 0s 4ms/step - loss: 0.1366\n","Epoch 40/500\n","1/1 [==============================] - 0s 3ms/step - loss: 0.1292\n","Epoch 41/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.1227\n","Epoch 42/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.1172\n","Epoch 43/500\n","1/1 [==============================] - 0s 4ms/step - loss: 0.1123\n","Epoch 44/500\n","1/1 [==============================] - 0s 4ms/step - loss: 0.1081\n","Epoch 45/500\n","1/1 [==============================] - 0s 4ms/step - loss: 0.1044\n","Epoch 46/500\n","1/1 [==============================] - 0s 3ms/step - loss: 0.1011\n","Epoch 47/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0982\n","Epoch 48/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0956\n","Epoch 49/500\n","1/1 [==============================] - 0s 3ms/step - loss: 0.0933\n","Epoch 50/500\n","1/1 [==============================] - 0s 3ms/step - loss: 0.0912\n","Epoch 51/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0893\n","Epoch 52/500\n","1/1 [==============================] - 0s 3ms/step - loss: 0.0875\n","Epoch 53/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0858\n","Epoch 54/500\n","1/1 [==============================] - 0s 4ms/step - loss: 0.0843\n","Epoch 55/500\n","1/1 [==============================] - 0s 4ms/step - loss: 0.0829\n","Epoch 56/500\n","1/1 [==============================] - 0s 4ms/step - loss: 0.0816\n","Epoch 57/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0803\n","Epoch 58/500\n","1/1 [==============================] - 0s 3ms/step - loss: 0.0791\n","Epoch 59/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0780\n","Epoch 60/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0769\n","Epoch 61/500\n","1/1 [==============================] - 0s 3ms/step - loss: 0.0758\n","Epoch 62/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0748\n","Epoch 63/500\n","1/1 [==============================] - 0s 3ms/step - loss: 0.0738\n","Epoch 64/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0728\n","Epoch 65/500\n","1/1 [==============================] - 0s 4ms/step - loss: 0.0719\n","Epoch 66/500\n","1/1 [==============================] - 0s 4ms/step - loss: 0.0710\n","Epoch 67/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0701\n","Epoch 68/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0692\n","Epoch 69/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0684\n","Epoch 70/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0675\n","Epoch 71/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0667\n","Epoch 72/500\n","1/1 [==============================] - 0s 3ms/step - loss: 0.0659\n","Epoch 73/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0651\n","Epoch 74/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0643\n","Epoch 75/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0635\n","Epoch 76/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0628\n","Epoch 77/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0620\n","Epoch 78/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0613\n","Epoch 79/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0605\n","Epoch 80/500\n","1/1 [==============================] - 0s 3ms/step - loss: 0.0598\n","Epoch 81/500\n","1/1 [==============================] - 0s 3ms/step - loss: 0.0591\n","Epoch 82/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0584\n","Epoch 83/500\n","1/1 [==============================] - 0s 3ms/step - loss: 0.0577\n","Epoch 84/500\n","1/1 [==============================] - 0s 3ms/step - loss: 0.0570\n","Epoch 85/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0563\n","Epoch 86/500\n","1/1 [==============================] - 0s 4ms/step - loss: 0.0557\n","Epoch 87/500\n","1/1 [==============================] - 0s 3ms/step - loss: 0.0550\n","Epoch 88/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0543\n","Epoch 89/500\n","1/1 [==============================] - 0s 6ms/step - loss: 0.0537\n","Epoch 90/500\n","1/1 [==============================] - 0s 4ms/step - loss: 0.0531\n","Epoch 91/500\n","1/1 [==============================] - 0s 4ms/step - loss: 0.0524\n","Epoch 92/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0518\n","Epoch 93/500\n","1/1 [==============================] - 0s 3ms/step - loss: 0.0512\n","Epoch 94/500\n","1/1 [==============================] - 0s 3ms/step - loss: 0.0506\n","Epoch 95/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0500\n","Epoch 96/500\n","1/1 [==============================] - 0s 3ms/step - loss: 0.0494\n","Epoch 97/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0488\n","Epoch 98/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0482\n","Epoch 99/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0477\n","Epoch 100/500\n","1/1 [==============================] - 0s 3ms/step - loss: 0.0471\n","Epoch 101/500\n","1/1 [==============================] - 0s 4ms/step - loss: 0.0465\n","Epoch 102/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0460\n","Epoch 103/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0454\n","Epoch 104/500\n","1/1 [==============================] - 0s 4ms/step - loss: 0.0449\n","Epoch 105/500\n","1/1 [==============================] - 0s 3ms/step - loss: 0.0444\n","Epoch 106/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0438\n","Epoch 107/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0433\n","Epoch 108/500\n","1/1 [==============================] - 0s 3ms/step - loss: 0.0428\n","Epoch 109/500\n","1/1 [==============================] - 0s 3ms/step - loss: 0.0423\n","Epoch 110/500\n","1/1 [==============================] - 0s 4ms/step - loss: 0.0418\n","Epoch 111/500\n","1/1 [==============================] - 0s 5ms/step - loss: 0.0413\n","Epoch 112/500\n","1/1 [==============================] - 0s 5ms/step - loss: 0.0408\n","Epoch 113/500\n","1/1 [==============================] - 0s 3ms/step - loss: 0.0403\n","Epoch 114/500\n","1/1 [==============================] - 0s 4ms/step - loss: 0.0398\n","Epoch 115/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0394\n","Epoch 116/500\n","1/1 [==============================] - 0s 8ms/step - loss: 0.0389\n","Epoch 117/500\n","1/1 [==============================] - 0s 4ms/step - loss: 0.0384\n","Epoch 118/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0380\n","Epoch 119/500\n","1/1 [==============================] - 0s 3ms/step - loss: 0.0375\n","Epoch 120/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0371\n","Epoch 121/500\n","1/1 [==============================] - 0s 3ms/step - loss: 0.0366\n","Epoch 122/500\n","1/1 [==============================] - 0s 3ms/step - loss: 0.0362\n","Epoch 123/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0358\n","Epoch 124/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0354\n","Epoch 125/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0349\n","Epoch 126/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0345\n","Epoch 127/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0341\n","Epoch 128/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0337\n","Epoch 129/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0333\n","Epoch 130/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0329\n","Epoch 131/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0325\n","Epoch 132/500\n","1/1 [==============================] - 0s 3ms/step - loss: 0.0321\n","Epoch 133/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0318\n","Epoch 134/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0314\n","Epoch 135/500\n","1/1 [==============================] - 0s 3ms/step - loss: 0.0310\n","Epoch 136/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0306\n","Epoch 137/500\n","1/1 [==============================] - 0s 3ms/step - loss: 0.0303\n","Epoch 138/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0299\n","Epoch 139/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0296\n","Epoch 140/500\n","1/1 [==============================] - 0s 4ms/step - loss: 0.0292\n","Epoch 141/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0289\n","Epoch 142/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0285\n","Epoch 143/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0282\n","Epoch 144/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0279\n","Epoch 145/500\n","1/1 [==============================] - 0s 3ms/step - loss: 0.0275\n","Epoch 146/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0272\n","Epoch 147/500\n","1/1 [==============================] - 0s 1ms/step - loss: 0.0269\n","Epoch 148/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0266\n","Epoch 149/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0262\n","Epoch 150/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0259\n","Epoch 151/500\n","1/1 [==============================] - 0s 3ms/step - loss: 0.0256\n","Epoch 152/500\n","1/1 [==============================] - 0s 3ms/step - loss: 0.0253\n","Epoch 153/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0250\n","Epoch 154/500\n","1/1 [==============================] - 0s 4ms/step - loss: 0.0247\n","Epoch 155/500\n","1/1 [==============================] - 0s 5ms/step - loss: 0.0244\n","Epoch 156/500\n","1/1 [==============================] - 0s 5ms/step - loss: 0.0241\n","Epoch 157/500\n","1/1 [==============================] - 0s 5ms/step - loss: 0.0238\n","Epoch 158/500\n","1/1 [==============================] - 0s 9ms/step - loss: 0.0236\n","Epoch 159/500\n","1/1 [==============================] - 0s 4ms/step - loss: 0.0233\n","Epoch 160/500\n","1/1 [==============================] - 0s 4ms/step - loss: 0.0230\n","Epoch 161/500\n","1/1 [==============================] - 0s 8ms/step - loss: 0.0227\n","Epoch 162/500\n","1/1 [==============================] - 0s 1ms/step - loss: 0.0225\n","Epoch 163/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0222\n","Epoch 164/500\n","1/1 [==============================] - 0s 3ms/step - loss: 0.0219\n","Epoch 165/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0217\n","Epoch 166/500\n","1/1 [==============================] - 0s 4ms/step - loss: 0.0214\n","Epoch 167/500\n","1/1 [==============================] - 0s 3ms/step - loss: 0.0212\n","Epoch 168/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0209\n","Epoch 169/500\n","1/1 [==============================] - 0s 3ms/step - loss: 0.0207\n","Epoch 170/500\n","1/1 [==============================] - 0s 1ms/step - loss: 0.0204\n","Epoch 171/500\n","1/1 [==============================] - 0s 3ms/step - loss: 0.0202\n","Epoch 172/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0199\n","Epoch 173/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0197\n","Epoch 174/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0195\n","Epoch 175/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0192\n","Epoch 176/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0190\n","Epoch 177/500\n","1/1 [==============================] - 0s 1ms/step - loss: 0.0188\n","Epoch 178/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0186\n","Epoch 179/500\n","1/1 [==============================] - 0s 1ms/step - loss: 0.0183\n","Epoch 180/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0181\n","Epoch 181/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0179\n","Epoch 182/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0177\n","Epoch 183/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0175\n","Epoch 184/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0173\n","Epoch 185/500\n","1/1 [==============================] - 0s 1ms/step - loss: 0.0171\n","Epoch 186/500\n","1/1 [==============================] - 0s 1ms/step - loss: 0.0169\n","Epoch 187/500\n","1/1 [==============================] - 0s 4ms/step - loss: 0.0167\n","Epoch 188/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0165\n","Epoch 189/500\n","1/1 [==============================] - 0s 4ms/step - loss: 0.0163\n","Epoch 190/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0161\n","Epoch 191/500\n","1/1 [==============================] - 0s 4ms/step - loss: 0.0159\n","Epoch 192/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0157\n","Epoch 193/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0155\n","Epoch 194/500\n","1/1 [==============================] - 0s 3ms/step - loss: 0.0153\n","Epoch 195/500\n","1/1 [==============================] - 0s 4ms/step - loss: 0.0152\n","Epoch 196/500\n","1/1 [==============================] - 0s 3ms/step - loss: 0.0150\n","Epoch 197/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0148\n","Epoch 198/500\n","1/1 [==============================] - 0s 3ms/step - loss: 0.0146\n","Epoch 199/500\n","1/1 [==============================] - 0s 4ms/step - loss: 0.0144\n","Epoch 200/500\n","1/1 [==============================] - 0s 4ms/step - loss: 0.0143\n","Epoch 201/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0141\n","Epoch 202/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0139\n","Epoch 203/500\n","1/1 [==============================] - 0s 1ms/step - loss: 0.0138\n","Epoch 204/500\n","1/1 [==============================] - 0s 3ms/step - loss: 0.0136\n","Epoch 205/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0135\n","Epoch 206/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0133\n","Epoch 207/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0131\n","Epoch 208/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0130\n","Epoch 209/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0128\n","Epoch 210/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0127\n","Epoch 211/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0125\n","Epoch 212/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0124\n","Epoch 213/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0122\n","Epoch 214/500\n","1/1 [==============================] - 0s 3ms/step - loss: 0.0121\n","Epoch 215/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0119\n","Epoch 216/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0118\n","Epoch 217/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0117\n","Epoch 218/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0115\n","Epoch 219/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0114\n","Epoch 220/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0112\n","Epoch 221/500\n","1/1 [==============================] - 0s 3ms/step - loss: 0.0111\n","Epoch 222/500\n","1/1 [==============================] - 0s 1ms/step - loss: 0.0110\n","Epoch 223/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0109\n","Epoch 224/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0107\n","Epoch 225/500\n","1/1 [==============================] - 0s 3ms/step - loss: 0.0106\n","Epoch 226/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0105\n","Epoch 227/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0103\n","Epoch 228/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0102\n","Epoch 229/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0101\n","Epoch 230/500\n","1/1 [==============================] - 0s 3ms/step - loss: 0.0100\n","Epoch 231/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0099\n","Epoch 232/500\n","1/1 [==============================] - 0s 5ms/step - loss: 0.0097\n","Epoch 233/500\n","1/1 [==============================] - 0s 1ms/step - loss: 0.0096\n","Epoch 234/500\n","1/1 [==============================] - 0s 3ms/step - loss: 0.0095\n","Epoch 235/500\n","1/1 [==============================] - 0s 3ms/step - loss: 0.0094\n","Epoch 236/500\n","1/1 [==============================] - 0s 3ms/step - loss: 0.0093\n","Epoch 237/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0092\n","Epoch 238/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0091\n","Epoch 239/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0090\n","Epoch 240/500\n","1/1 [==============================] - 0s 3ms/step - loss: 0.0089\n","Epoch 241/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0088\n","Epoch 242/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0086\n","Epoch 243/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0085\n","Epoch 244/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0084\n","Epoch 245/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0083\n","Epoch 246/500\n","1/1 [==============================] - 0s 9ms/step - loss: 0.0082\n","Epoch 247/500\n","1/1 [==============================] - 0s 3ms/step - loss: 0.0081\n","Epoch 248/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0081\n","Epoch 249/500\n","1/1 [==============================] - 0s 5ms/step - loss: 0.0080\n","Epoch 250/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0079\n","Epoch 251/500\n","1/1 [==============================] - 0s 4ms/step - loss: 0.0078\n","Epoch 252/500\n","1/1 [==============================] - 0s 5ms/step - loss: 0.0077\n","Epoch 253/500\n","1/1 [==============================] - 0s 4ms/step - loss: 0.0076\n","Epoch 254/500\n","1/1 [==============================] - 0s 4ms/step - loss: 0.0075\n","Epoch 255/500\n","1/1 [==============================] - 0s 6ms/step - loss: 0.0074\n","Epoch 256/500\n","1/1 [==============================] - 0s 5ms/step - loss: 0.0073\n","Epoch 257/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0072\n","Epoch 258/500\n","1/1 [==============================] - 0s 5ms/step - loss: 0.0071\n","Epoch 259/500\n","1/1 [==============================] - 0s 6ms/step - loss: 0.0071\n","Epoch 260/500\n","1/1 [==============================] - 0s 3ms/step - loss: 0.0070\n","Epoch 261/500\n","1/1 [==============================] - 0s 4ms/step - loss: 0.0069\n","Epoch 262/500\n","1/1 [==============================] - 0s 5ms/step - loss: 0.0068\n","Epoch 263/500\n","1/1 [==============================] - 0s 4ms/step - loss: 0.0067\n","Epoch 264/500\n","1/1 [==============================] - 0s 4ms/step - loss: 0.0067\n","Epoch 265/500\n","1/1 [==============================] - 0s 3ms/step - loss: 0.0066\n","Epoch 266/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0065\n","Epoch 267/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0064\n","Epoch 268/500\n","1/1 [==============================] - 0s 1ms/step - loss: 0.0063\n","Epoch 269/500\n","1/1 [==============================] - 0s 4ms/step - loss: 0.0063\n","Epoch 270/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0062\n","Epoch 271/500\n","1/1 [==============================] - 0s 3ms/step - loss: 0.0061\n","Epoch 272/500\n","1/1 [==============================] - 0s 3ms/step - loss: 0.0060\n","Epoch 273/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0060\n","Epoch 274/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0059\n","Epoch 275/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0058\n","Epoch 276/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0058\n","Epoch 277/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0057\n","Epoch 278/500\n","1/1 [==============================] - 0s 3ms/step - loss: 0.0056\n","Epoch 279/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0056\n","Epoch 280/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0055\n","Epoch 281/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0054\n","Epoch 282/500\n","1/1 [==============================] - 0s 3ms/step - loss: 0.0054\n","Epoch 283/500\n","1/1 [==============================] - 0s 3ms/step - loss: 0.0053\n","Epoch 284/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0052\n","Epoch 285/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0052\n","Epoch 286/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0051\n","Epoch 287/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0051\n","Epoch 288/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0050\n","Epoch 289/500\n","1/1 [==============================] - 0s 4ms/step - loss: 0.0049\n","Epoch 290/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0049\n","Epoch 291/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0048\n","Epoch 292/500\n","1/1 [==============================] - 0s 4ms/step - loss: 0.0048\n","Epoch 293/500\n","1/1 [==============================] - 0s 3ms/step - loss: 0.0047\n","Epoch 294/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0047\n","Epoch 295/500\n","1/1 [==============================] - 0s 3ms/step - loss: 0.0046\n","Epoch 296/500\n","1/1 [==============================] - 0s 3ms/step - loss: 0.0045\n","Epoch 297/500\n","1/1 [==============================] - 0s 3ms/step - loss: 0.0045\n","Epoch 298/500\n","1/1 [==============================] - 0s 3ms/step - loss: 0.0044\n","Epoch 299/500\n","1/1 [==============================] - 0s 4ms/step - loss: 0.0044\n","Epoch 300/500\n","1/1 [==============================] - 0s 4ms/step - loss: 0.0043\n","Epoch 301/500\n","1/1 [==============================] - 0s 3ms/step - loss: 0.0043\n","Epoch 302/500\n","1/1 [==============================] - 0s 3ms/step - loss: 0.0042\n","Epoch 303/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0042\n","Epoch 304/500\n","1/1 [==============================] - 0s 3ms/step - loss: 0.0041\n","Epoch 305/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0041\n","Epoch 306/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0040\n","Epoch 307/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0040\n","Epoch 308/500\n","1/1 [==============================] - 0s 3ms/step - loss: 0.0039\n","Epoch 309/500\n","1/1 [==============================] - 0s 3ms/step - loss: 0.0039\n","Epoch 310/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0038\n","Epoch 311/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0038\n","Epoch 312/500\n","1/1 [==============================] - 0s 4ms/step - loss: 0.0038\n","Epoch 313/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0037\n","Epoch 314/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0037\n","Epoch 315/500\n","1/1 [==============================] - 0s 3ms/step - loss: 0.0036\n","Epoch 316/500\n","1/1 [==============================] - 0s 3ms/step - loss: 0.0036\n","Epoch 317/500\n","1/1 [==============================] - 0s 3ms/step - loss: 0.0035\n","Epoch 318/500\n","1/1 [==============================] - 0s 3ms/step - loss: 0.0035\n","Epoch 319/500\n","1/1 [==============================] - 0s 3ms/step - loss: 0.0035\n","Epoch 320/500\n","1/1 [==============================] - 0s 4ms/step - loss: 0.0034\n","Epoch 321/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0034\n","Epoch 322/500\n","1/1 [==============================] - 0s 3ms/step - loss: 0.0033\n","Epoch 323/500\n","1/1 [==============================] - 0s 4ms/step - loss: 0.0033\n","Epoch 324/500\n","1/1 [==============================] - 0s 5ms/step - loss: 0.0033\n","Epoch 325/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0032\n","Epoch 326/500\n","1/1 [==============================] - 0s 3ms/step - loss: 0.0032\n","Epoch 327/500\n","1/1 [==============================] - 0s 1ms/step - loss: 0.0031\n","Epoch 328/500\n","1/1 [==============================] - 0s 4ms/step - loss: 0.0031\n","Epoch 329/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0031\n","Epoch 330/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0030\n","Epoch 331/500\n","1/1 [==============================] - 0s 3ms/step - loss: 0.0030\n","Epoch 332/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0030\n","Epoch 333/500\n","1/1 [==============================] - 0s 6ms/step - loss: 0.0029\n","Epoch 334/500\n","1/1 [==============================] - 0s 6ms/step - loss: 0.0029\n","Epoch 335/500\n","1/1 [==============================] - 0s 1ms/step - loss: 0.0029\n","Epoch 336/500\n","1/1 [==============================] - 0s 1ms/step - loss: 0.0028\n","Epoch 337/500\n","1/1 [==============================] - 0s 4ms/step - loss: 0.0028\n","Epoch 338/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0028\n","Epoch 339/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0027\n","Epoch 340/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0027\n","Epoch 341/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0027\n","Epoch 342/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0026\n","Epoch 343/500\n","1/1 [==============================] - 0s 1ms/step - loss: 0.0026\n","Epoch 344/500\n","1/1 [==============================] - 0s 12ms/step - loss: 0.0026\n","Epoch 345/500\n","1/1 [==============================] - 0s 3ms/step - loss: 0.0025\n","Epoch 346/500\n","1/1 [==============================] - 0s 6ms/step - loss: 0.0025\n","Epoch 347/500\n","1/1 [==============================] - 0s 4ms/step - loss: 0.0025\n","Epoch 348/500\n","1/1 [==============================] - 0s 3ms/step - loss: 0.0024\n","Epoch 349/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0024\n","Epoch 350/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0024\n","Epoch 351/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0024\n","Epoch 352/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0023\n","Epoch 353/500\n","1/1 [==============================] - 0s 1ms/step - loss: 0.0023\n","Epoch 354/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0023\n","Epoch 355/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0022\n","Epoch 356/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0022\n","Epoch 357/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0022\n","Epoch 358/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0022\n","Epoch 359/500\n","1/1 [==============================] - 0s 1ms/step - loss: 0.0021\n","Epoch 360/500\n","1/1 [==============================] - 0s 3ms/step - loss: 0.0021\n","Epoch 361/500\n","1/1 [==============================] - 0s 1ms/step - loss: 0.0021\n","Epoch 362/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0021\n","Epoch 363/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0020\n","Epoch 364/500\n","1/1 [==============================] - 0s 1ms/step - loss: 0.0020\n","Epoch 365/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0020\n","Epoch 366/500\n","1/1 [==============================] - 0s 4ms/step - loss: 0.0020\n","Epoch 367/500\n","1/1 [==============================] - 0s 3ms/step - loss: 0.0019\n","Epoch 368/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0019\n","Epoch 369/500\n","1/1 [==============================] - 0s 3ms/step - loss: 0.0019\n","Epoch 370/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0019\n","Epoch 371/500\n","1/1 [==============================] - 0s 3ms/step - loss: 0.0019\n","Epoch 372/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0018\n","Epoch 373/500\n","1/1 [==============================] - 0s 3ms/step - loss: 0.0018\n","Epoch 374/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0018\n","Epoch 375/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0018\n","Epoch 376/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0017\n","Epoch 377/500\n","1/1 [==============================] - 0s 4ms/step - loss: 0.0017\n","Epoch 378/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0017\n","Epoch 379/500\n","1/1 [==============================] - 0s 3ms/step - loss: 0.0017\n","Epoch 380/500\n","1/1 [==============================] - 0s 4ms/step - loss: 0.0017\n","Epoch 381/500\n","1/1 [==============================] - 0s 4ms/step - loss: 0.0016\n","Epoch 382/500\n","1/1 [==============================] - 0s 3ms/step - loss: 0.0016\n","Epoch 383/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0016\n","Epoch 384/500\n","1/1 [==============================] - 0s 6ms/step - loss: 0.0016\n","Epoch 385/500\n","1/1 [==============================] - 0s 3ms/step - loss: 0.0016\n","Epoch 386/500\n","1/1 [==============================] - 0s 3ms/step - loss: 0.0016\n","Epoch 387/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0015\n","Epoch 388/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0015\n","Epoch 389/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0015\n","Epoch 390/500\n","1/1 [==============================] - 0s 3ms/step - loss: 0.0015\n","Epoch 391/500\n","1/1 [==============================] - 0s 3ms/step - loss: 0.0015\n","Epoch 392/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0014\n","Epoch 393/500\n","1/1 [==============================] - 0s 3ms/step - loss: 0.0014\n","Epoch 394/500\n","1/1 [==============================] - 0s 3ms/step - loss: 0.0014\n","Epoch 395/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0014\n","Epoch 396/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0014\n","Epoch 397/500\n","1/1 [==============================] - 0s 3ms/step - loss: 0.0014\n","Epoch 398/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0013\n","Epoch 399/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0013\n","Epoch 400/500\n","1/1 [==============================] - 0s 1ms/step - loss: 0.0013\n","Epoch 401/500\n","1/1 [==============================] - 0s 4ms/step - loss: 0.0013\n","Epoch 402/500\n","1/1 [==============================] - 0s 3ms/step - loss: 0.0013\n","Epoch 403/500\n","1/1 [==============================] - 0s 4ms/step - loss: 0.0013\n","Epoch 404/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0013\n","Epoch 405/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0012\n","Epoch 406/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0012\n","Epoch 407/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0012\n","Epoch 408/500\n","1/1 [==============================] - 0s 1ms/step - loss: 0.0012\n","Epoch 409/500\n","1/1 [==============================] - 0s 3ms/step - loss: 0.0012\n","Epoch 410/500\n","1/1 [==============================] - 0s 1ms/step - loss: 0.0012\n","Epoch 411/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0012\n","Epoch 412/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0011\n","Epoch 413/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0011\n","Epoch 414/500\n","1/1 [==============================] - 0s 3ms/step - loss: 0.0011\n","Epoch 415/500\n","1/1 [==============================] - 0s 1ms/step - loss: 0.0011\n","Epoch 416/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0011\n","Epoch 417/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0011\n","Epoch 418/500\n","1/1 [==============================] - 0s 4ms/step - loss: 0.0011\n","Epoch 419/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0010\n","Epoch 420/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0010\n","Epoch 421/500\n","1/1 [==============================] - 0s 2ms/step - loss: 0.0010\n","Epoch 422/500\n","1/1 [==============================] - 0s 1ms/step - loss: 0.0010\n","Epoch 423/500\n","1/1 [==============================] - 0s 2ms/step - loss: 9.9759e-04\n","Epoch 424/500\n","1/1 [==============================] - 0s 2ms/step - loss: 9.8576e-04\n","Epoch 425/500\n","1/1 [==============================] - 0s 2ms/step - loss: 9.7406e-04\n","Epoch 426/500\n","1/1 [==============================] - 0s 2ms/step - loss: 9.6251e-04\n","Epoch 427/500\n","1/1 [==============================] - 0s 2ms/step - loss: 9.5110e-04\n","Epoch 428/500\n","1/1 [==============================] - 0s 3ms/step - loss: 9.3981e-04\n","Epoch 429/500\n","1/1 [==============================] - 0s 4ms/step - loss: 9.2867e-04\n","Epoch 430/500\n","1/1 [==============================] - 0s 2ms/step - loss: 9.1764e-04\n","Epoch 431/500\n","1/1 [==============================] - 0s 2ms/step - loss: 9.0676e-04\n","Epoch 432/500\n","1/1 [==============================] - 0s 1ms/step - loss: 8.9601e-04\n","Epoch 433/500\n","1/1 [==============================] - 0s 1ms/step - loss: 8.8538e-04\n","Epoch 434/500\n","1/1 [==============================] - 0s 1ms/step - loss: 8.7487e-04\n","Epoch 435/500\n","1/1 [==============================] - 0s 2ms/step - loss: 8.6450e-04\n","Epoch 436/500\n","1/1 [==============================] - 0s 1ms/step - loss: 8.5424e-04\n","Epoch 437/500\n","1/1 [==============================] - 0s 3ms/step - loss: 8.4411e-04\n","Epoch 438/500\n","1/1 [==============================] - 0s 1ms/step - loss: 8.3410e-04\n","Epoch 439/500\n","1/1 [==============================] - 0s 3ms/step - loss: 8.2420e-04\n","Epoch 440/500\n","1/1 [==============================] - 0s 1ms/step - loss: 8.1442e-04\n","Epoch 441/500\n","1/1 [==============================] - 0s 2ms/step - loss: 8.0476e-04\n","Epoch 442/500\n","1/1 [==============================] - 0s 1ms/step - loss: 7.9522e-04\n","Epoch 443/500\n","1/1 [==============================] - 0s 1ms/step - loss: 7.8579e-04\n","Epoch 444/500\n","1/1 [==============================] - 0s 2ms/step - loss: 7.7647e-04\n","Epoch 445/500\n","1/1 [==============================] - 0s 1ms/step - loss: 7.6726e-04\n","Epoch 446/500\n","1/1 [==============================] - 0s 2ms/step - loss: 7.5816e-04\n","Epoch 447/500\n","1/1 [==============================] - 0s 2ms/step - loss: 7.4916e-04\n","Epoch 448/500\n","1/1 [==============================] - 0s 2ms/step - loss: 7.4028e-04\n","Epoch 449/500\n","1/1 [==============================] - 0s 1ms/step - loss: 7.3150e-04\n","Epoch 450/500\n","1/1 [==============================] - 0s 1ms/step - loss: 7.2282e-04\n","Epoch 451/500\n","1/1 [==============================] - 0s 1ms/step - loss: 7.1424e-04\n","Epoch 452/500\n","1/1 [==============================] - 0s 2ms/step - loss: 7.0577e-04\n","Epoch 453/500\n","1/1 [==============================] - 0s 7ms/step - loss: 6.9740e-04\n","Epoch 454/500\n","1/1 [==============================] - 0s 2ms/step - loss: 6.8913e-04\n","Epoch 455/500\n","1/1 [==============================] - 0s 2ms/step - loss: 6.8095e-04\n","Epoch 456/500\n","1/1 [==============================] - 0s 6ms/step - loss: 6.7287e-04\n","Epoch 457/500\n","1/1 [==============================] - 0s 3ms/step - loss: 6.6489e-04\n","Epoch 458/500\n","1/1 [==============================] - 0s 2ms/step - loss: 6.5700e-04\n","Epoch 459/500\n","1/1 [==============================] - 0s 2ms/step - loss: 6.4921e-04\n","Epoch 460/500\n","1/1 [==============================] - 0s 2ms/step - loss: 6.4151e-04\n","Epoch 461/500\n","1/1 [==============================] - 0s 2ms/step - loss: 6.3390e-04\n","Epoch 462/500\n","1/1 [==============================] - 0s 1ms/step - loss: 6.2638e-04\n","Epoch 463/500\n","1/1 [==============================] - 0s 2ms/step - loss: 6.1895e-04\n","Epoch 464/500\n","1/1 [==============================] - 0s 1ms/step - loss: 6.1161e-04\n","Epoch 465/500\n","1/1 [==============================] - 0s 3ms/step - loss: 6.0435e-04\n","Epoch 466/500\n","1/1 [==============================] - 0s 2ms/step - loss: 5.9718e-04\n","Epoch 467/500\n","1/1 [==============================] - 0s 2ms/step - loss: 5.9010e-04\n","Epoch 468/500\n","1/1 [==============================] - 0s 2ms/step - loss: 5.8310e-04\n","Epoch 469/500\n","1/1 [==============================] - 0s 2ms/step - loss: 5.7618e-04\n","Epoch 470/500\n","1/1 [==============================] - 0s 4ms/step - loss: 5.6935e-04\n","Epoch 471/500\n","1/1 [==============================] - 0s 2ms/step - loss: 5.6259e-04\n","Epoch 472/500\n","1/1 [==============================] - 0s 3ms/step - loss: 5.5592e-04\n","Epoch 473/500\n","1/1 [==============================] - 0s 2ms/step - loss: 5.4932e-04\n","Epoch 474/500\n","1/1 [==============================] - 0s 2ms/step - loss: 5.4281e-04\n","Epoch 475/500\n","1/1 [==============================] - 0s 2ms/step - loss: 5.3637e-04\n","Epoch 476/500\n","1/1 [==============================] - 0s 1ms/step - loss: 5.3000e-04\n","Epoch 477/500\n","1/1 [==============================] - 0s 3ms/step - loss: 5.2372e-04\n","Epoch 478/500\n","1/1 [==============================] - 0s 3ms/step - loss: 5.1750e-04\n","Epoch 479/500\n","1/1 [==============================] - 0s 3ms/step - loss: 5.1137e-04\n","Epoch 480/500\n","1/1 [==============================] - 0s 2ms/step - loss: 5.0530e-04\n","Epoch 481/500\n","1/1 [==============================] - 0s 2ms/step - loss: 4.9931e-04\n","Epoch 482/500\n","1/1 [==============================] - 0s 2ms/step - loss: 4.9339e-04\n","Epoch 483/500\n","1/1 [==============================] - 0s 2ms/step - loss: 4.8753e-04\n","Epoch 484/500\n","1/1 [==============================] - 0s 2ms/step - loss: 4.8175e-04\n","Epoch 485/500\n","1/1 [==============================] - 0s 1ms/step - loss: 4.7604e-04\n","Epoch 486/500\n","1/1 [==============================] - 0s 2ms/step - loss: 4.7039e-04\n","Epoch 487/500\n","1/1 [==============================] - 0s 1ms/step - loss: 4.6481e-04\n","Epoch 488/500\n","1/1 [==============================] - 0s 2ms/step - loss: 4.5930e-04\n","Epoch 489/500\n","1/1 [==============================] - 0s 1ms/step - loss: 4.5385e-04\n","Epoch 490/500\n","1/1 [==============================] - 0s 2ms/step - loss: 4.4846e-04\n","Epoch 491/500\n","1/1 [==============================] - 0s 2ms/step - loss: 4.4314e-04\n","Epoch 492/500\n","1/1 [==============================] - 0s 6ms/step - loss: 4.3788e-04\n","Epoch 493/500\n","1/1 [==============================] - 0s 3ms/step - loss: 4.3269e-04\n","Epoch 494/500\n","1/1 [==============================] - 0s 2ms/step - loss: 4.2756e-04\n","Epoch 495/500\n","1/1 [==============================] - 0s 4ms/step - loss: 4.2249e-04\n","Epoch 496/500\n","1/1 [==============================] - 0s 2ms/step - loss: 4.1747e-04\n","Epoch 497/500\n","1/1 [==============================] - 0s 2ms/step - loss: 4.1252e-04\n","Epoch 498/500\n","1/1 [==============================] - 0s 2ms/step - loss: 4.0763e-04\n","Epoch 499/500\n","1/1 [==============================] - 0s 2ms/step - loss: 4.0280e-04\n","Epoch 500/500\n","1/1 [==============================] - 0s 1ms/step - loss: 3.9802e-04\n"],"name":"stdout"},{"output_type":"execute_result","data":{"text/plain":[""]},"metadata":{"tags":[]},"execution_count":8}]},{"cell_type":"markdown","metadata":{"id":"jv39WBzD57jM"},"source":["### 2.2 Inferring with a Single Neuron\n","\n","Use the trained Single Neuron to perform an inferrence. Try x=3, does the output equal 6.5?"]},{"cell_type":"code","metadata":{"id":"zl2QLl9J57jN","executionInfo":{"status":"ok","timestamp":1601383953032,"user_tz":-480,"elapsed":7358,"user":{"displayName":"Jin Jun Jway","photoUrl":"","userId":"02417309841025273729"}},"outputId":"d33eed63-5705-449e-f274-045ff256eff7","colab":{"base_uri":"https://localhost:8080/","height":34}},"source":["new_x = 3\n","new_x = np.array([new_x])\n","model.predict(new_x)[0]"],"execution_count":9,"outputs":[{"output_type":"execute_result","data":{"text/plain":["array([6.486659], dtype=float32)"]},"metadata":{"tags":[]},"execution_count":9}]},{"cell_type":"markdown","metadata":{"id":"mRqgPTXr57jU"},"source":["## 3.0 Multi Layer Perceptron\n","\n","Stacking neurons together and layering them together, it is possible to create powerful inference modules."]},{"cell_type":"markdown","metadata":{"id":"-O8MLNET57jW"},"source":["### 3.1 Train Test Split\n","\n","Perform a train test split on the dataset."]},{"cell_type":"code","metadata":{"scrolled":true,"id":"fzDSWdQ857jX","executionInfo":{"status":"ok","timestamp":1601383953383,"user_tz":-480,"elapsed":7168,"user":{"displayName":"Jin Jun Jway","photoUrl":"","userId":"02417309841025273729"}}},"source":["from sklearn.model_selection import train_test_split\n","from tools.utils import transform_data\n","\n","train_df = pd.read_csv(\"data/train.csv\")\n","\n","X = train_df.drop('Survived', axis=1)\n","y = train_df[['Survived']]\n","\n","X_train, X_val, y_train, y_val = train_test_split(X, y, test_size=0.3, random_state=42)"],"execution_count":10,"outputs":[]},{"cell_type":"markdown","metadata":{"id":"e7Betbod57jd"},"source":["### 3.2 Perform Data Transformations\n","\n","Clean the data, transform the data etc."]},{"cell_type":"code","metadata":{"id":"DomVD7al57je","executionInfo":{"status":"ok","timestamp":1601383953679,"user_tz":-480,"elapsed":7154,"user":{"displayName":"Jin Jun Jway","photoUrl":"","userId":"02417309841025273729"}}},"source":["X_train = transform_data(X_train)\n","X_val = transform_data(X_val)"],"execution_count":11,"outputs":[]},{"cell_type":"markdown","metadata":{"id":"YtQutloV57jk"},"source":["### 3.3 Initialise and train MLP\n","\n","Train the multilayer perceptron to perform inference."]},{"cell_type":"code","metadata":{"scrolled":true,"id":"0pW84__P57jl","executionInfo":{"status":"ok","timestamp":1601383976433,"user_tz":-480,"elapsed":29565,"user":{"displayName":"Jin Jun Jway","photoUrl":"","userId":"02417309841025273729"}},"outputId":"a70e15a9-5286-461c-95c8-417c4ee41d85","colab":{"base_uri":"https://localhost:8080/","height":1000}},"source":["model = tf.keras.Sequential()\n","model.add(Dense(10, input_shape=[11], activation='relu'))\n","model.add(Dense(20, activation='relu'))\n","model.add(Dense(60, activation='relu'))\n","model.add(Dense(1, activation='sigmoid'))\n","model.compile(optimizer='adam', loss='binary_crossentropy', metrics=['accuracy'])\n","\n","# train model\n","model.fit(X_train, y_train, epochs=500)"],"execution_count":12,"outputs":[{"output_type":"stream","text":["Epoch 1/500\n","20/20 [==============================] - 0s 2ms/step - loss: 8.1762 - accuracy: 0.5169\n","Epoch 2/500\n","20/20 [==============================] - 0s 2ms/step - loss: 2.8752 - accuracy: 0.6388\n","Epoch 3/500\n","20/20 [==============================] - 0s 2ms/step - loss: 1.7793 - accuracy: 0.5136\n","Epoch 4/500\n","20/20 [==============================] - 0s 2ms/step - loss: 1.0432 - accuracy: 0.5586\n","Epoch 5/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.7980 - accuracy: 0.6244\n","Epoch 6/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.7687 - accuracy: 0.6324\n","Epoch 7/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.7254 - accuracy: 0.6051\n","Epoch 8/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.6711 - accuracy: 0.6340\n","Epoch 9/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.6865 - accuracy: 0.6276\n","Epoch 10/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.6802 - accuracy: 0.6196\n","Epoch 11/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.6561 - accuracy: 0.6693\n","Epoch 12/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.6705 - accuracy: 0.6453\n","Epoch 13/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.6307 - accuracy: 0.6517\n","Epoch 14/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.6253 - accuracy: 0.6709\n","Epoch 15/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.6345 - accuracy: 0.6501\n","Epoch 16/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.6175 - accuracy: 0.6677\n","Epoch 17/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.6116 - accuracy: 0.6726\n","Epoch 18/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.6411 - accuracy: 0.6501\n","Epoch 19/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.6622 - accuracy: 0.6469\n","Epoch 20/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.6461 - accuracy: 0.6501\n","Epoch 21/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.6159 - accuracy: 0.6709\n","Epoch 22/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.6563 - accuracy: 0.6517\n","Epoch 23/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.6466 - accuracy: 0.6517\n","Epoch 24/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.6216 - accuracy: 0.6645\n","Epoch 25/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.6006 - accuracy: 0.6790\n","Epoch 26/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.6065 - accuracy: 0.6629\n","Epoch 27/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.5932 - accuracy: 0.6726\n","Epoch 28/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.6085 - accuracy: 0.6709\n","Epoch 29/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.6323 - accuracy: 0.6597\n","Epoch 30/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.6248 - accuracy: 0.6854\n","Epoch 31/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.6439 - accuracy: 0.6709\n","Epoch 32/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.5990 - accuracy: 0.6774\n","Epoch 33/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.6118 - accuracy: 0.6758\n","Epoch 34/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.6522 - accuracy: 0.6437\n","Epoch 35/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.5911 - accuracy: 0.6870\n","Epoch 36/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.5893 - accuracy: 0.6886\n","Epoch 37/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.6105 - accuracy: 0.6806\n","Epoch 38/500\n","20/20 [==============================] - 0s 3ms/step - loss: 0.6102 - accuracy: 0.6822\n","Epoch 39/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.6028 - accuracy: 0.6838\n","Epoch 40/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.6567 - accuracy: 0.6356\n","Epoch 41/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.5843 - accuracy: 0.6918\n","Epoch 42/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.5937 - accuracy: 0.6918\n","Epoch 43/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.5800 - accuracy: 0.6822\n","Epoch 44/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.5950 - accuracy: 0.6709\n","Epoch 45/500\n","20/20 [==============================] - 0s 3ms/step - loss: 0.5774 - accuracy: 0.6934\n","Epoch 46/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.5785 - accuracy: 0.7079\n","Epoch 47/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.5762 - accuracy: 0.6854\n","Epoch 48/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.6270 - accuracy: 0.6613\n","Epoch 49/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.6074 - accuracy: 0.6742\n","Epoch 50/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.5729 - accuracy: 0.6950\n","Epoch 51/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.5784 - accuracy: 0.6902\n","Epoch 52/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.5707 - accuracy: 0.6966\n","Epoch 53/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.5746 - accuracy: 0.6950\n","Epoch 54/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.5725 - accuracy: 0.6998\n","Epoch 55/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.5785 - accuracy: 0.7063\n","Epoch 56/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.6173 - accuracy: 0.6645\n","Epoch 57/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.6487 - accuracy: 0.6790\n","Epoch 58/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.5741 - accuracy: 0.6838\n","Epoch 59/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.5894 - accuracy: 0.7063\n","Epoch 60/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.6126 - accuracy: 0.6838\n","Epoch 61/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.6389 - accuracy: 0.6629\n","Epoch 62/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.6413 - accuracy: 0.6886\n","Epoch 63/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.5968 - accuracy: 0.6966\n","Epoch 64/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.6264 - accuracy: 0.6726\n","Epoch 65/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.6004 - accuracy: 0.6822\n","Epoch 66/500\n","20/20 [==============================] - 0s 3ms/step - loss: 0.5640 - accuracy: 0.6966\n","Epoch 67/500\n","20/20 [==============================] - 0s 3ms/step - loss: 0.5855 - accuracy: 0.6934\n","Epoch 68/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.5849 - accuracy: 0.6982\n","Epoch 69/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.5859 - accuracy: 0.6886\n","Epoch 70/500\n","20/20 [==============================] - 0s 3ms/step - loss: 0.5609 - accuracy: 0.7047\n","Epoch 71/500\n","20/20 [==============================] - 0s 4ms/step - loss: 0.5639 - accuracy: 0.6870\n","Epoch 72/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.5714 - accuracy: 0.6886\n","Epoch 73/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.5639 - accuracy: 0.6934\n","Epoch 74/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.5594 - accuracy: 0.7127\n","Epoch 75/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.5895 - accuracy: 0.6854\n","Epoch 76/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.5556 - accuracy: 0.6982\n","Epoch 77/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.5581 - accuracy: 0.7030\n","Epoch 78/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.5911 - accuracy: 0.6774\n","Epoch 79/500\n","20/20 [==============================] - 0s 3ms/step - loss: 0.6075 - accuracy: 0.6838\n","Epoch 80/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.5950 - accuracy: 0.6629\n","Epoch 81/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.5798 - accuracy: 0.6709\n","Epoch 82/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.5621 - accuracy: 0.6982\n","Epoch 83/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.5588 - accuracy: 0.7063\n","Epoch 84/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.5617 - accuracy: 0.6902\n","Epoch 85/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.6510 - accuracy: 0.6453\n","Epoch 86/500\n","20/20 [==============================] - 0s 1ms/step - loss: 0.5540 - accuracy: 0.7030\n","Epoch 87/500\n","20/20 [==============================] - 0s 1ms/step - loss: 0.5685 - accuracy: 0.7014\n","Epoch 88/500\n","20/20 [==============================] - 0s 1ms/step - loss: 0.5623 - accuracy: 0.6870\n","Epoch 89/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.5577 - accuracy: 0.6950\n","Epoch 90/500\n","20/20 [==============================] - 0s 1ms/step - loss: 0.5649 - accuracy: 0.6854\n","Epoch 91/500\n","20/20 [==============================] - 0s 1ms/step - loss: 0.6137 - accuracy: 0.6709\n","Epoch 92/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.5456 - accuracy: 0.6982\n","Epoch 93/500\n","20/20 [==============================] - 0s 1ms/step - loss: 0.5471 - accuracy: 0.7063\n","Epoch 94/500\n","20/20 [==============================] - 0s 1ms/step - loss: 0.5699 - accuracy: 0.6950\n","Epoch 95/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.5546 - accuracy: 0.6902\n","Epoch 96/500\n","20/20 [==============================] - 0s 1ms/step - loss: 0.5449 - accuracy: 0.7175\n","Epoch 97/500\n","20/20 [==============================] - 0s 1ms/step - loss: 0.5482 - accuracy: 0.6934\n","Epoch 98/500\n","20/20 [==============================] - 0s 1ms/step - loss: 0.5708 - accuracy: 0.6886\n","Epoch 99/500\n","20/20 [==============================] - 0s 1ms/step - loss: 0.5631 - accuracy: 0.6854\n","Epoch 100/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.5709 - accuracy: 0.6902\n","Epoch 101/500\n","20/20 [==============================] - 0s 1ms/step - loss: 0.5504 - accuracy: 0.7063\n","Epoch 102/500\n","20/20 [==============================] - 0s 1ms/step - loss: 0.5485 - accuracy: 0.7223\n","Epoch 103/500\n","20/20 [==============================] - 0s 1ms/step - loss: 0.5450 - accuracy: 0.7095\n","Epoch 104/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.5807 - accuracy: 0.6918\n","Epoch 105/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.5680 - accuracy: 0.7030\n","Epoch 106/500\n","20/20 [==============================] - 0s 1ms/step - loss: 0.5376 - accuracy: 0.7223\n","Epoch 107/500\n","20/20 [==============================] - 0s 1ms/step - loss: 0.5379 - accuracy: 0.7111\n","Epoch 108/500\n","20/20 [==============================] - 0s 1ms/step - loss: 0.5377 - accuracy: 0.7159\n","Epoch 109/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.6337 - accuracy: 0.6533\n","Epoch 110/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.5705 - accuracy: 0.6950\n","Epoch 111/500\n","20/20 [==============================] - 0s 1ms/step - loss: 0.5456 - accuracy: 0.7079\n","Epoch 112/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.5360 - accuracy: 0.7143\n","Epoch 113/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.5571 - accuracy: 0.7111\n","Epoch 114/500\n","20/20 [==============================] - 0s 1ms/step - loss: 0.5676 - accuracy: 0.6918\n","Epoch 115/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.5532 - accuracy: 0.7111\n","Epoch 116/500\n","20/20 [==============================] - 0s 1ms/step - loss: 0.5447 - accuracy: 0.7191\n","Epoch 117/500\n","20/20 [==============================] - 0s 1ms/step - loss: 0.5389 - accuracy: 0.7191\n","Epoch 118/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.6004 - accuracy: 0.6774\n","Epoch 119/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.5394 - accuracy: 0.7111\n","Epoch 120/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.5317 - accuracy: 0.7159\n","Epoch 121/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.5575 - accuracy: 0.6934\n","Epoch 122/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.5787 - accuracy: 0.6982\n","Epoch 123/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.5756 - accuracy: 0.7095\n","Epoch 124/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.5395 - accuracy: 0.7255\n","Epoch 125/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.5232 - accuracy: 0.7175\n","Epoch 126/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.5224 - accuracy: 0.7384\n","Epoch 127/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.5172 - accuracy: 0.7319\n","Epoch 128/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.5622 - accuracy: 0.7014\n","Epoch 129/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.5640 - accuracy: 0.6918\n","Epoch 130/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.5630 - accuracy: 0.7111\n","Epoch 131/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.5388 - accuracy: 0.7047\n","Epoch 132/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.5408 - accuracy: 0.7111\n","Epoch 133/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.5214 - accuracy: 0.7143\n","Epoch 134/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.5186 - accuracy: 0.7239\n","Epoch 135/500\n","20/20 [==============================] - 0s 3ms/step - loss: 0.5248 - accuracy: 0.7271\n","Epoch 136/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.5518 - accuracy: 0.7014\n","Epoch 137/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.5568 - accuracy: 0.7143\n","Epoch 138/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.5717 - accuracy: 0.6902\n","Epoch 139/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.5279 - accuracy: 0.7271\n","Epoch 140/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.5519 - accuracy: 0.7271\n","Epoch 141/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.5387 - accuracy: 0.7063\n","Epoch 142/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.5145 - accuracy: 0.7271\n","Epoch 143/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.5308 - accuracy: 0.7159\n","Epoch 144/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.5271 - accuracy: 0.7287\n","Epoch 145/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.5421 - accuracy: 0.7127\n","Epoch 146/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.5243 - accuracy: 0.7319\n","Epoch 147/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.5104 - accuracy: 0.7352\n","Epoch 148/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.5319 - accuracy: 0.7191\n","Epoch 149/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.5278 - accuracy: 0.7368\n","Epoch 150/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.5208 - accuracy: 0.7111\n","Epoch 151/500\n","20/20 [==============================] - 0s 3ms/step - loss: 0.5182 - accuracy: 0.7239\n","Epoch 152/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.5284 - accuracy: 0.7143\n","Epoch 153/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.5182 - accuracy: 0.7352\n","Epoch 154/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.5128 - accuracy: 0.7239\n","Epoch 155/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.5061 - accuracy: 0.7384\n","Epoch 156/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.5186 - accuracy: 0.7287\n","Epoch 157/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.5208 - accuracy: 0.7191\n","Epoch 158/500\n","20/20 [==============================] - 0s 3ms/step - loss: 0.5042 - accuracy: 0.7416\n","Epoch 159/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.5097 - accuracy: 0.7335\n","Epoch 160/500\n","20/20 [==============================] - 0s 3ms/step - loss: 0.5103 - accuracy: 0.7303\n","Epoch 161/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.5293 - accuracy: 0.7143\n","Epoch 162/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.5037 - accuracy: 0.7384\n","Epoch 163/500\n","20/20 [==============================] - 0s 3ms/step - loss: 0.5128 - accuracy: 0.7352\n","Epoch 164/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4951 - accuracy: 0.7448\n","Epoch 165/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.5171 - accuracy: 0.7271\n","Epoch 166/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.5219 - accuracy: 0.7319\n","Epoch 167/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.5570 - accuracy: 0.7127\n","Epoch 168/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.5088 - accuracy: 0.7319\n","Epoch 169/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.5095 - accuracy: 0.7432\n","Epoch 170/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.5101 - accuracy: 0.7400\n","Epoch 171/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.5266 - accuracy: 0.7127\n","Epoch 172/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.5349 - accuracy: 0.7287\n","Epoch 173/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.5294 - accuracy: 0.7368\n","Epoch 174/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.5053 - accuracy: 0.7384\n","Epoch 175/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4995 - accuracy: 0.7384\n","Epoch 176/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.5230 - accuracy: 0.7175\n","Epoch 177/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.5155 - accuracy: 0.7303\n","Epoch 178/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.5271 - accuracy: 0.7095\n","Epoch 179/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.5230 - accuracy: 0.7287\n","Epoch 180/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.5210 - accuracy: 0.7239\n","Epoch 181/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4987 - accuracy: 0.7352\n","Epoch 182/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.5214 - accuracy: 0.7287\n","Epoch 183/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.5036 - accuracy: 0.7400\n","Epoch 184/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.5056 - accuracy: 0.7480\n","Epoch 185/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.5096 - accuracy: 0.7384\n","Epoch 186/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4971 - accuracy: 0.7368\n","Epoch 187/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4860 - accuracy: 0.7496\n","Epoch 188/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4846 - accuracy: 0.7624\n","Epoch 189/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4917 - accuracy: 0.7512\n","Epoch 190/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4915 - accuracy: 0.7287\n","Epoch 191/500\n","20/20 [==============================] - 0s 3ms/step - loss: 0.5231 - accuracy: 0.7352\n","Epoch 192/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4916 - accuracy: 0.7528\n","Epoch 193/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.5035 - accuracy: 0.7400\n","Epoch 194/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.5047 - accuracy: 0.7319\n","Epoch 195/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.5098 - accuracy: 0.7303\n","Epoch 196/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4907 - accuracy: 0.7512\n","Epoch 197/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4960 - accuracy: 0.7464\n","Epoch 198/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.5302 - accuracy: 0.7303\n","Epoch 199/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.5285 - accuracy: 0.7303\n","Epoch 200/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4984 - accuracy: 0.7432\n","Epoch 201/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.5184 - accuracy: 0.7352\n","Epoch 202/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4998 - accuracy: 0.7400\n","Epoch 203/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4765 - accuracy: 0.7689\n","Epoch 204/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4958 - accuracy: 0.7432\n","Epoch 205/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4941 - accuracy: 0.7271\n","Epoch 206/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.5145 - accuracy: 0.7239\n","Epoch 207/500\n","20/20 [==============================] - 0s 3ms/step - loss: 0.5098 - accuracy: 0.7319\n","Epoch 208/500\n","20/20 [==============================] - 0s 3ms/step - loss: 0.5079 - accuracy: 0.7303\n","Epoch 209/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4828 - accuracy: 0.7592\n","Epoch 210/500\n","20/20 [==============================] - 0s 3ms/step - loss: 0.4972 - accuracy: 0.7464\n","Epoch 211/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4939 - accuracy: 0.7512\n","Epoch 212/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4943 - accuracy: 0.7400\n","Epoch 213/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.5006 - accuracy: 0.7432\n","Epoch 214/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.5310 - accuracy: 0.7287\n","Epoch 215/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4977 - accuracy: 0.7335\n","Epoch 216/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4818 - accuracy: 0.7528\n","Epoch 217/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4847 - accuracy: 0.7512\n","Epoch 218/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4804 - accuracy: 0.7512\n","Epoch 219/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4806 - accuracy: 0.7464\n","Epoch 220/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4736 - accuracy: 0.7624\n","Epoch 221/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4783 - accuracy: 0.7592\n","Epoch 222/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4945 - accuracy: 0.7448\n","Epoch 223/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.5223 - accuracy: 0.7400\n","Epoch 224/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4735 - accuracy: 0.7640\n","Epoch 225/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4855 - accuracy: 0.7673\n","Epoch 226/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4674 - accuracy: 0.7592\n","Epoch 227/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4870 - accuracy: 0.7464\n","Epoch 228/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4709 - accuracy: 0.7576\n","Epoch 229/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4730 - accuracy: 0.7560\n","Epoch 230/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.5036 - accuracy: 0.7432\n","Epoch 231/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4730 - accuracy: 0.7544\n","Epoch 232/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4759 - accuracy: 0.7608\n","Epoch 233/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.5108 - accuracy: 0.7287\n","Epoch 234/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4899 - accuracy: 0.7512\n","Epoch 235/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.5356 - accuracy: 0.7352\n","Epoch 236/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4826 - accuracy: 0.7608\n","Epoch 237/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4755 - accuracy: 0.7592\n","Epoch 238/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4737 - accuracy: 0.7544\n","Epoch 239/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4856 - accuracy: 0.7496\n","Epoch 240/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4823 - accuracy: 0.7432\n","Epoch 241/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4584 - accuracy: 0.7689\n","Epoch 242/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4774 - accuracy: 0.7560\n","Epoch 243/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4747 - accuracy: 0.7592\n","Epoch 244/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4656 - accuracy: 0.7737\n","Epoch 245/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4884 - accuracy: 0.7480\n","Epoch 246/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4597 - accuracy: 0.7528\n","Epoch 247/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4526 - accuracy: 0.7737\n","Epoch 248/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4759 - accuracy: 0.7657\n","Epoch 249/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4835 - accuracy: 0.7592\n","Epoch 250/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4608 - accuracy: 0.7640\n","Epoch 251/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4662 - accuracy: 0.7640\n","Epoch 252/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4512 - accuracy: 0.7721\n","Epoch 253/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4680 - accuracy: 0.7640\n","Epoch 254/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4909 - accuracy: 0.7576\n","Epoch 255/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4797 - accuracy: 0.7624\n","Epoch 256/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4853 - accuracy: 0.7592\n","Epoch 257/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.5071 - accuracy: 0.7512\n","Epoch 258/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4616 - accuracy: 0.7624\n","Epoch 259/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4772 - accuracy: 0.7512\n","Epoch 260/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4746 - accuracy: 0.7496\n","Epoch 261/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4997 - accuracy: 0.7480\n","Epoch 262/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4816 - accuracy: 0.7480\n","Epoch 263/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4798 - accuracy: 0.7544\n","Epoch 264/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4536 - accuracy: 0.7721\n","Epoch 265/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4653 - accuracy: 0.7657\n","Epoch 266/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4801 - accuracy: 0.7640\n","Epoch 267/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4581 - accuracy: 0.7624\n","Epoch 268/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4639 - accuracy: 0.7608\n","Epoch 269/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4478 - accuracy: 0.7608\n","Epoch 270/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4801 - accuracy: 0.7657\n","Epoch 271/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4660 - accuracy: 0.7576\n","Epoch 272/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4530 - accuracy: 0.7657\n","Epoch 273/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4986 - accuracy: 0.7303\n","Epoch 274/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4628 - accuracy: 0.7528\n","Epoch 275/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4717 - accuracy: 0.7592\n","Epoch 276/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4471 - accuracy: 0.7737\n","Epoch 277/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4967 - accuracy: 0.7480\n","Epoch 278/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4718 - accuracy: 0.7640\n","Epoch 279/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4436 - accuracy: 0.7705\n","Epoch 280/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4638 - accuracy: 0.7640\n","Epoch 281/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4613 - accuracy: 0.7673\n","Epoch 282/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4425 - accuracy: 0.7785\n","Epoch 283/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4509 - accuracy: 0.7705\n","Epoch 284/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4450 - accuracy: 0.7737\n","Epoch 285/500\n","20/20 [==============================] - 0s 3ms/step - loss: 0.4607 - accuracy: 0.7673\n","Epoch 286/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4664 - accuracy: 0.7769\n","Epoch 287/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4510 - accuracy: 0.7897\n","Epoch 288/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4671 - accuracy: 0.7544\n","Epoch 289/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4696 - accuracy: 0.7560\n","Epoch 290/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4493 - accuracy: 0.7657\n","Epoch 291/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4672 - accuracy: 0.7608\n","Epoch 292/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4606 - accuracy: 0.7560\n","Epoch 293/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4419 - accuracy: 0.7737\n","Epoch 294/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4411 - accuracy: 0.7801\n","Epoch 295/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4530 - accuracy: 0.7624\n","Epoch 296/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4605 - accuracy: 0.7480\n","Epoch 297/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4519 - accuracy: 0.7673\n","Epoch 298/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4527 - accuracy: 0.7640\n","Epoch 299/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4448 - accuracy: 0.7689\n","Epoch 300/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4529 - accuracy: 0.7560\n","Epoch 301/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4504 - accuracy: 0.7576\n","Epoch 302/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4369 - accuracy: 0.7817\n","Epoch 303/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4447 - accuracy: 0.7705\n","Epoch 304/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4670 - accuracy: 0.7624\n","Epoch 305/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4279 - accuracy: 0.7737\n","Epoch 306/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4284 - accuracy: 0.7881\n","Epoch 307/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4572 - accuracy: 0.7705\n","Epoch 308/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4369 - accuracy: 0.7737\n","Epoch 309/500\n","20/20 [==============================] - 0s 3ms/step - loss: 0.4334 - accuracy: 0.7624\n","Epoch 310/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4382 - accuracy: 0.7817\n","Epoch 311/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4365 - accuracy: 0.7721\n","Epoch 312/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4588 - accuracy: 0.7689\n","Epoch 313/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4517 - accuracy: 0.7801\n","Epoch 314/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4567 - accuracy: 0.7608\n","Epoch 315/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4457 - accuracy: 0.7769\n","Epoch 316/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4520 - accuracy: 0.7753\n","Epoch 317/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4669 - accuracy: 0.7689\n","Epoch 318/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4313 - accuracy: 0.7721\n","Epoch 319/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4354 - accuracy: 0.7785\n","Epoch 320/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4207 - accuracy: 0.7865\n","Epoch 321/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4283 - accuracy: 0.7897\n","Epoch 322/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4390 - accuracy: 0.7608\n","Epoch 323/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4275 - accuracy: 0.7897\n","Epoch 324/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4380 - accuracy: 0.7737\n","Epoch 325/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4603 - accuracy: 0.7544\n","Epoch 326/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4318 - accuracy: 0.7737\n","Epoch 327/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4364 - accuracy: 0.7833\n","Epoch 328/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4259 - accuracy: 0.7881\n","Epoch 329/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4493 - accuracy: 0.7801\n","Epoch 330/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4495 - accuracy: 0.7592\n","Epoch 331/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4315 - accuracy: 0.7721\n","Epoch 332/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4315 - accuracy: 0.7961\n","Epoch 333/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4604 - accuracy: 0.7544\n","Epoch 334/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4404 - accuracy: 0.7769\n","Epoch 335/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4332 - accuracy: 0.7801\n","Epoch 336/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4303 - accuracy: 0.7881\n","Epoch 337/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4487 - accuracy: 0.7833\n","Epoch 338/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4209 - accuracy: 0.7913\n","Epoch 339/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4332 - accuracy: 0.7865\n","Epoch 340/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4202 - accuracy: 0.7833\n","Epoch 341/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4223 - accuracy: 0.7929\n","Epoch 342/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4149 - accuracy: 0.7961\n","Epoch 343/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4311 - accuracy: 0.7785\n","Epoch 344/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4206 - accuracy: 0.7897\n","Epoch 345/500\n","20/20 [==============================] - 0s 1ms/step - loss: 0.4454 - accuracy: 0.7817\n","Epoch 346/500\n","20/20 [==============================] - 0s 1ms/step - loss: 0.4322 - accuracy: 0.7769\n","Epoch 347/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4242 - accuracy: 0.7849\n","Epoch 348/500\n","20/20 [==============================] - 0s 1ms/step - loss: 0.4209 - accuracy: 0.7801\n","Epoch 349/500\n","20/20 [==============================] - 0s 1ms/step - loss: 0.4229 - accuracy: 0.7849\n","Epoch 350/500\n","20/20 [==============================] - 0s 1ms/step - loss: 0.4488 - accuracy: 0.7737\n","Epoch 351/500\n","20/20 [==============================] - 0s 1ms/step - loss: 0.4391 - accuracy: 0.7833\n","Epoch 352/500\n","20/20 [==============================] - 0s 1ms/step - loss: 0.4232 - accuracy: 0.7897\n","Epoch 353/500\n","20/20 [==============================] - 0s 1ms/step - loss: 0.4257 - accuracy: 0.7753\n","Epoch 354/500\n","20/20 [==============================] - 0s 1ms/step - loss: 0.4225 - accuracy: 0.7753\n","Epoch 355/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4372 - accuracy: 0.7833\n","Epoch 356/500\n","20/20 [==============================] - 0s 1ms/step - loss: 0.4209 - accuracy: 0.7929\n","Epoch 357/500\n","20/20 [==============================] - 0s 1ms/step - loss: 0.4287 - accuracy: 0.7881\n","Epoch 358/500\n","20/20 [==============================] - 0s 1ms/step - loss: 0.4155 - accuracy: 0.7865\n","Epoch 359/500\n","20/20 [==============================] - 0s 1ms/step - loss: 0.4047 - accuracy: 0.7945\n","Epoch 360/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4090 - accuracy: 0.7897\n","Epoch 361/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4415 - accuracy: 0.7801\n","Epoch 362/500\n","20/20 [==============================] - 0s 1ms/step - loss: 0.4916 - accuracy: 0.7512\n","Epoch 363/500\n","20/20 [==============================] - 0s 1ms/step - loss: 0.4635 - accuracy: 0.7689\n","Epoch 364/500\n","20/20 [==============================] - 0s 1ms/step - loss: 0.4561 - accuracy: 0.7737\n","Epoch 365/500\n","20/20 [==============================] - 0s 1ms/step - loss: 0.4750 - accuracy: 0.7480\n","Epoch 366/500\n","20/20 [==============================] - 0s 1ms/step - loss: 0.4446 - accuracy: 0.7737\n","Epoch 367/500\n","20/20 [==============================] - 0s 1ms/step - loss: 0.4771 - accuracy: 0.7689\n","Epoch 368/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4194 - accuracy: 0.7865\n","Epoch 369/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4383 - accuracy: 0.7737\n","Epoch 370/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4338 - accuracy: 0.7833\n","Epoch 371/500\n","20/20 [==============================] - 0s 1ms/step - loss: 0.4417 - accuracy: 0.7673\n","Epoch 372/500\n","20/20 [==============================] - 0s 1ms/step - loss: 0.4293 - accuracy: 0.7801\n","Epoch 373/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4174 - accuracy: 0.7657\n","Epoch 374/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4089 - accuracy: 0.7961\n","Epoch 375/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4184 - accuracy: 0.7833\n","Epoch 376/500\n","20/20 [==============================] - 0s 1ms/step - loss: 0.4076 - accuracy: 0.7945\n","Epoch 377/500\n","20/20 [==============================] - 0s 1ms/step - loss: 0.4139 - accuracy: 0.7865\n","Epoch 378/500\n","20/20 [==============================] - 0s 1ms/step - loss: 0.4007 - accuracy: 0.7978\n","Epoch 379/500\n","20/20 [==============================] - 0s 1ms/step - loss: 0.4199 - accuracy: 0.7897\n","Epoch 380/500\n","20/20 [==============================] - 0s 1ms/step - loss: 0.4276 - accuracy: 0.7721\n","Epoch 381/500\n","20/20 [==============================] - 0s 1ms/step - loss: 0.4774 - accuracy: 0.7528\n","Epoch 382/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4932 - accuracy: 0.7528\n","Epoch 383/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4616 - accuracy: 0.7592\n","Epoch 384/500\n","20/20 [==============================] - 0s 1ms/step - loss: 0.4402 - accuracy: 0.7785\n","Epoch 385/500\n","20/20 [==============================] - 0s 1ms/step - loss: 0.4429 - accuracy: 0.7817\n","Epoch 386/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4495 - accuracy: 0.7608\n","Epoch 387/500\n","20/20 [==============================] - 0s 1ms/step - loss: 0.4476 - accuracy: 0.7528\n","Epoch 388/500\n","20/20 [==============================] - 0s 1ms/step - loss: 0.4515 - accuracy: 0.7576\n","Epoch 389/500\n","20/20 [==============================] - 0s 1ms/step - loss: 0.4861 - accuracy: 0.7448\n","Epoch 390/500\n","20/20 [==============================] - 0s 1ms/step - loss: 0.4308 - accuracy: 0.7817\n","Epoch 391/500\n","20/20 [==============================] - 0s 1ms/step - loss: 0.4128 - accuracy: 0.7801\n","Epoch 392/500\n","20/20 [==============================] - 0s 1ms/step - loss: 0.4111 - accuracy: 0.7881\n","Epoch 393/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4376 - accuracy: 0.7785\n","Epoch 394/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4520 - accuracy: 0.7640\n","Epoch 395/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4369 - accuracy: 0.7721\n","Epoch 396/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4697 - accuracy: 0.7721\n","Epoch 397/500\n","20/20 [==============================] - 0s 1ms/step - loss: 0.4527 - accuracy: 0.7592\n","Epoch 398/500\n","20/20 [==============================] - 0s 1ms/step - loss: 0.4268 - accuracy: 0.7817\n","Epoch 399/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4293 - accuracy: 0.7801\n","Epoch 400/500\n","20/20 [==============================] - 0s 1ms/step - loss: 0.4207 - accuracy: 0.7849\n","Epoch 401/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4022 - accuracy: 0.7961\n","Epoch 402/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4109 - accuracy: 0.7785\n","Epoch 403/500\n","20/20 [==============================] - 0s 1ms/step - loss: 0.4197 - accuracy: 0.7929\n","Epoch 404/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4064 - accuracy: 0.7897\n","Epoch 405/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4004 - accuracy: 0.7978\n","Epoch 406/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4072 - accuracy: 0.7865\n","Epoch 407/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4275 - accuracy: 0.7753\n","Epoch 408/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4179 - accuracy: 0.7721\n","Epoch 409/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4260 - accuracy: 0.7865\n","Epoch 410/500\n","20/20 [==============================] - 0s 1ms/step - loss: 0.4836 - accuracy: 0.7657\n","Epoch 411/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.5081 - accuracy: 0.7608\n","Epoch 412/500\n","20/20 [==============================] - 0s 1ms/step - loss: 0.4243 - accuracy: 0.7817\n","Epoch 413/500\n","20/20 [==============================] - 0s 1ms/step - loss: 0.4003 - accuracy: 0.7945\n","Epoch 414/500\n","20/20 [==============================] - 0s 1ms/step - loss: 0.4027 - accuracy: 0.8042\n","Epoch 415/500\n","20/20 [==============================] - 0s 1ms/step - loss: 0.4071 - accuracy: 0.7817\n","Epoch 416/500\n","20/20 [==============================] - 0s 1ms/step - loss: 0.4140 - accuracy: 0.7929\n","Epoch 417/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.3967 - accuracy: 0.8010\n","Epoch 418/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4104 - accuracy: 0.7721\n","Epoch 419/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4186 - accuracy: 0.7849\n","Epoch 420/500\n","20/20 [==============================] - 0s 1ms/step - loss: 0.4146 - accuracy: 0.7833\n","Epoch 421/500\n","20/20 [==============================] - 0s 1ms/step - loss: 0.3905 - accuracy: 0.8010\n","Epoch 422/500\n","20/20 [==============================] - 0s 1ms/step - loss: 0.3990 - accuracy: 0.7961\n","Epoch 423/500\n","20/20 [==============================] - 0s 1ms/step - loss: 0.3942 - accuracy: 0.8042\n","Epoch 424/500\n","20/20 [==============================] - 0s 1ms/step - loss: 0.3975 - accuracy: 0.7961\n","Epoch 425/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4023 - accuracy: 0.7961\n","Epoch 426/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4326 - accuracy: 0.7817\n","Epoch 427/500\n","20/20 [==============================] - 0s 1ms/step - loss: 0.4177 - accuracy: 0.7785\n","Epoch 428/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4050 - accuracy: 0.8042\n","Epoch 429/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4004 - accuracy: 0.7817\n","Epoch 430/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4150 - accuracy: 0.8042\n","Epoch 431/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4123 - accuracy: 0.7801\n","Epoch 432/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4137 - accuracy: 0.7897\n","Epoch 433/500\n","20/20 [==============================] - 0s 1ms/step - loss: 0.4147 - accuracy: 0.7897\n","Epoch 434/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4102 - accuracy: 0.7865\n","Epoch 435/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4315 - accuracy: 0.7881\n","Epoch 436/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4019 - accuracy: 0.7897\n","Epoch 437/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4361 - accuracy: 0.7608\n","Epoch 438/500\n","20/20 [==============================] - 0s 1ms/step - loss: 0.4010 - accuracy: 0.7801\n","Epoch 439/500\n","20/20 [==============================] - 0s 1ms/step - loss: 0.4087 - accuracy: 0.7881\n","Epoch 440/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4098 - accuracy: 0.7801\n","Epoch 441/500\n","20/20 [==============================] - 0s 1ms/step - loss: 0.4263 - accuracy: 0.7689\n","Epoch 442/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4106 - accuracy: 0.7849\n","Epoch 443/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.3893 - accuracy: 0.7978\n","Epoch 444/500\n","20/20 [==============================] - 0s 1ms/step - loss: 0.4077 - accuracy: 0.7801\n","Epoch 445/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4019 - accuracy: 0.7945\n","Epoch 446/500\n","20/20 [==============================] - 0s 1ms/step - loss: 0.3911 - accuracy: 0.8058\n","Epoch 447/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4446 - accuracy: 0.7737\n","Epoch 448/500\n","20/20 [==============================] - 0s 1ms/step - loss: 0.4030 - accuracy: 0.8026\n","Epoch 449/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4497 - accuracy: 0.7528\n","Epoch 450/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4054 - accuracy: 0.7833\n","Epoch 451/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4057 - accuracy: 0.7961\n","Epoch 452/500\n","20/20 [==============================] - 0s 1ms/step - loss: 0.4058 - accuracy: 0.7737\n","Epoch 453/500\n","20/20 [==============================] - 0s 1ms/step - loss: 0.4044 - accuracy: 0.7817\n","Epoch 454/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4229 - accuracy: 0.7913\n","Epoch 455/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4111 - accuracy: 0.7785\n","Epoch 456/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4029 - accuracy: 0.7897\n","Epoch 457/500\n","20/20 [==============================] - 0s 1ms/step - loss: 0.3895 - accuracy: 0.8074\n","Epoch 458/500\n","20/20 [==============================] - 0s 1ms/step - loss: 0.4075 - accuracy: 0.7769\n","Epoch 459/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4426 - accuracy: 0.7705\n","Epoch 460/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4142 - accuracy: 0.7881\n","Epoch 461/500\n","20/20 [==============================] - 0s 1ms/step - loss: 0.3859 - accuracy: 0.8026\n","Epoch 462/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4024 - accuracy: 0.7913\n","Epoch 463/500\n","20/20 [==============================] - 0s 1ms/step - loss: 0.3950 - accuracy: 0.7994\n","Epoch 464/500\n","20/20 [==============================] - 0s 1ms/step - loss: 0.3786 - accuracy: 0.8122\n","Epoch 465/500\n","20/20 [==============================] - 0s 1ms/step - loss: 0.3841 - accuracy: 0.7994\n","Epoch 466/500\n","20/20 [==============================] - 0s 1ms/step - loss: 0.3912 - accuracy: 0.7978\n","Epoch 467/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4078 - accuracy: 0.7817\n","Epoch 468/500\n","20/20 [==============================] - 0s 1ms/step - loss: 0.3902 - accuracy: 0.8026\n","Epoch 469/500\n","20/20 [==============================] - 0s 1ms/step - loss: 0.4033 - accuracy: 0.7961\n","Epoch 470/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.3856 - accuracy: 0.8010\n","Epoch 471/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.3875 - accuracy: 0.8058\n","Epoch 472/500\n","20/20 [==============================] - 0s 1ms/step - loss: 0.3826 - accuracy: 0.7994\n","Epoch 473/500\n","20/20 [==============================] - 0s 1ms/step - loss: 0.4079 - accuracy: 0.7929\n","Epoch 474/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.3993 - accuracy: 0.7961\n","Epoch 475/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4094 - accuracy: 0.7881\n","Epoch 476/500\n","20/20 [==============================] - 0s 1ms/step - loss: 0.4009 - accuracy: 0.7945\n","Epoch 477/500\n","20/20 [==============================] - 0s 1ms/step - loss: 0.4006 - accuracy: 0.7881\n","Epoch 478/500\n","20/20 [==============================] - 0s 1ms/step - loss: 0.4139 - accuracy: 0.7801\n","Epoch 479/500\n","20/20 [==============================] - 0s 1ms/step - loss: 0.4097 - accuracy: 0.7897\n","Epoch 480/500\n","20/20 [==============================] - 0s 1ms/step - loss: 0.4109 - accuracy: 0.7849\n","Epoch 481/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.3861 - accuracy: 0.8074\n","Epoch 482/500\n","20/20 [==============================] - 0s 1ms/step - loss: 0.3973 - accuracy: 0.7961\n","Epoch 483/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4045 - accuracy: 0.7785\n","Epoch 484/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.3907 - accuracy: 0.7833\n","Epoch 485/500\n","20/20 [==============================] - 0s 1ms/step - loss: 0.3940 - accuracy: 0.7913\n","Epoch 486/500\n","20/20 [==============================] - 0s 1ms/step - loss: 0.3950 - accuracy: 0.8074\n","Epoch 487/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.3852 - accuracy: 0.8010\n","Epoch 488/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.3856 - accuracy: 0.7994\n","Epoch 489/500\n","20/20 [==============================] - 0s 1ms/step - loss: 0.3779 - accuracy: 0.7978\n","Epoch 490/500\n","20/20 [==============================] - 0s 1ms/step - loss: 0.3862 - accuracy: 0.8010\n","Epoch 491/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.3865 - accuracy: 0.7994\n","Epoch 492/500\n","20/20 [==============================] - 0s 1ms/step - loss: 0.3973 - accuracy: 0.7913\n","Epoch 493/500\n","20/20 [==============================] - 0s 1ms/step - loss: 0.4232 - accuracy: 0.7817\n","Epoch 494/500\n","20/20 [==============================] - 0s 1ms/step - loss: 0.4402 - accuracy: 0.7817\n","Epoch 495/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.4346 - accuracy: 0.7512\n","Epoch 496/500\n","20/20 [==============================] - 0s 1ms/step - loss: 0.3966 - accuracy: 0.8074\n","Epoch 497/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.3964 - accuracy: 0.7978\n","Epoch 498/500\n","20/20 [==============================] - 0s 1ms/step - loss: 0.4029 - accuracy: 0.7897\n","Epoch 499/500\n","20/20 [==============================] - 0s 2ms/step - loss: 0.3849 - accuracy: 0.7978\n","Epoch 500/500\n","20/20 [==============================] - 0s 1ms/step - loss: 0.3880 - accuracy: 0.7897\n"],"name":"stdout"},{"output_type":"execute_result","data":{"text/plain":[""]},"metadata":{"tags":[]},"execution_count":12}]},{"cell_type":"markdown","metadata":{"id":"D1rpS38u57jq"},"source":["### 3.4 Model Performance\n","\n","Evaluate model performance against a Test set."]},{"cell_type":"code","metadata":{"id":"SHrXgS_657jq","executionInfo":{"status":"ok","timestamp":1601383977013,"user_tz":-480,"elapsed":29195,"user":{"displayName":"Jin Jun Jway","photoUrl":"","userId":"02417309841025273729"}},"outputId":"d5d1d563-61a5-4c38-a8cc-efdd4e20157b","colab":{"base_uri":"https://localhost:8080/","height":52}},"source":["from tools.utils import transform_data\n","\n","test_df = pd.read_csv(\"data/test.csv\")\n","\n","X_test = train_df.drop('Survived', axis=1)\n","y_test = train_df[['Survived']]\n","\n","X_test = transform_data(X_test)\n","\n","model.evaluate(X_test, y_test)[1]"],"execution_count":13,"outputs":[{"output_type":"stream","text":["28/28 [==============================] - 0s 982us/step - loss: 0.8763 - accuracy: 0.6678\n"],"name":"stdout"},{"output_type":"execute_result","data":{"text/plain":["0.6677889823913574"]},"metadata":{"tags":[]},"execution_count":13}]},{"cell_type":"markdown","metadata":{"id":"ZcMeNz3557jx"},"source":["### 3.5 Model Inferrence\n","\n","Use the developed model to perform an inference with the test dataset. Take a look at the label and understand the output."]},{"cell_type":"code","metadata":{"id":"7ZgXNmP657jy","executionInfo":{"status":"ok","timestamp":1601383977014,"user_tz":-480,"elapsed":27521,"user":{"displayName":"Jin Jun Jway","photoUrl":"","userId":"02417309841025273729"}},"outputId":"62691466-02b0-49a7-8348-6024bfe4bcd1","colab":{"base_uri":"https://localhost:8080/","height":104}},"source":["y_pred = np.round(model.predict(X_test), 0)\n","y_pred[:5] # show inference for first 5 rows of the data"],"execution_count":14,"outputs":[{"output_type":"execute_result","data":{"text/plain":["array([[0.],\n"," [1.],\n"," [0.],\n"," [1.],\n"," [0.]], dtype=float32)"]},"metadata":{"tags":[]},"execution_count":14}]},{"cell_type":"markdown","metadata":{"id":"UqfV5A0957j3"},"source":["### 3.6 Save the Model\n","\n","Save the model using keras's built in API (do not use pickle)"]},{"cell_type":"code","metadata":{"id":"y7wLMsWr57j4","executionInfo":{"status":"ok","timestamp":1601383977335,"user_tz":-480,"elapsed":26735,"user":{"displayName":"Jin Jun Jway","photoUrl":"","userId":"02417309841025273729"}}},"source":["filepath = \"mlp_model.h5\"\n","model.save(filepath)"],"execution_count":15,"outputs":[]},{"cell_type":"markdown","metadata":{"id":"s1kTdnAl57j8"},"source":["### 3.7 Load the Model\n","\n","Load the model using keras's built in API (do not use pickle) and make sure it works by calling loaded_model evaluate"]},{"cell_type":"code","metadata":{"id":"keMEhEOV57j-","outputId":"6156c0b8-4f56-435f-f941-f77e7f0960b7"},"source":["loaded_model = keras.models.load_model(filepath)\n","loaded_model.evaluate(X_test, y_test)"],"execution_count":null,"outputs":[{"output_type":"stream","text":["28/28 [==============================] - 0s 1ms/step - loss: 0.7453 - accuracy: 0.7205\n"],"name":"stdout"},{"output_type":"execute_result","data":{"text/plain":["[0.7453004717826843, 0.7205387353897095]"]},"metadata":{"tags":[]},"execution_count":10}]},{"cell_type":"markdown","metadata":{"id":"R-K7I2Rc57kF"},"source":["## Appendix\n","\n","### General Links\n","\n","- [Keras Documentation](https://www.tensorflow.org/api_docs/python/tf/keras) - Useful place to find out more on capabilities of Keras.\n","- [Medium Article - Introduction to Neural Networks](https://towardsdatascience.com/machine-learning-for-beginners-an-introduction-to-neural-networks-d49f22d238f9) - Introductory article providing overview into Neural Networks\n","\n","### Specific Topics\n","\n","- [Tensorboard](https://www.tensorflow.org/tensorboard) - Useful tool to visualize model performance\n","- [Save and Load Keras Models](https://www.tensorflow.org/guide/keras/save_and_serialize) - explains how to save and load keras models."]}]}