-
Notifications
You must be signed in to change notification settings - Fork 0
/
ClassifAI_ 3 - Intro NN
1 lines (1 loc) · 43.5 KB
/
ClassifAI_ 3 - Intro NN
1
{"nbformat":4,"nbformat_minor":0,"metadata":{"colab":{"name":"ClassifAI: 3 - Intro NN","provenance":[{"file_id":"14EZ1rv3KjsiGl_rmUbzpcqxJ5bwDz53x","timestamp":1653863951047},{"file_id":"1OpQ1_boCAqH46UKtP3WQqAyXlAlEp9Wk","timestamp":1634465676258}],"collapsed_sections":[]},"kernelspec":{"name":"python3","display_name":"Python 3"},"language_info":{"name":"python"},"accelerator":"GPU"},"cells":[{"cell_type":"code","metadata":{"id":"ORw2oq4tcjKh","colab":{"base_uri":"https://localhost:8080/"},"executionInfo":{"status":"ok","timestamp":1660526030077,"user_tz":420,"elapsed":6017,"user":{"displayName":"Leo Huang","userId":"16558901284710269921"}},"outputId":"dba9d3c9-a544-4085-895b-4ab4182e1320"},"source":["!pip install tensorflow\n","!pip3 install keras-visualizer"],"execution_count":5,"outputs":[{"output_type":"stream","name":"stdout","text":["Looking in indexes: https://pypi.org/simple, https://us-python.pkg.dev/colab-wheels/public/simple/\n","Requirement already satisfied: tensorflow in /usr/local/lib/python3.7/dist-packages (2.8.2+zzzcolab20220719082949)\n","Requirement already satisfied: flatbuffers>=1.12 in /usr/local/lib/python3.7/dist-packages (from tensorflow) (2.0)\n","Requirement already satisfied: libclang>=9.0.1 in /usr/local/lib/python3.7/dist-packages (from tensorflow) (14.0.6)\n","Requirement already satisfied: google-pasta>=0.1.1 in /usr/local/lib/python3.7/dist-packages (from tensorflow) (0.2.0)\n","Requirement already satisfied: opt-einsum>=2.3.2 in /usr/local/lib/python3.7/dist-packages (from tensorflow) (3.3.0)\n","Requirement already satisfied: numpy>=1.20 in /usr/local/lib/python3.7/dist-packages (from tensorflow) (1.21.6)\n","Requirement already satisfied: tensorflow-estimator<2.9,>=2.8 in /usr/local/lib/python3.7/dist-packages (from tensorflow) (2.8.0)\n","Requirement already satisfied: setuptools in /usr/local/lib/python3.7/dist-packages (from tensorflow) (57.4.0)\n","Requirement already satisfied: grpcio<2.0,>=1.24.3 in /usr/local/lib/python3.7/dist-packages (from tensorflow) (1.47.0)\n","Requirement already satisfied: keras-preprocessing>=1.1.1 in /usr/local/lib/python3.7/dist-packages (from tensorflow) (1.1.2)\n","Requirement already satisfied: gast>=0.2.1 in /usr/local/lib/python3.7/dist-packages (from tensorflow) (0.5.3)\n","Requirement already satisfied: tensorboard<2.9,>=2.8 in /usr/local/lib/python3.7/dist-packages (from tensorflow) (2.8.0)\n","Requirement already satisfied: keras<2.9,>=2.8.0rc0 in /usr/local/lib/python3.7/dist-packages (from tensorflow) (2.8.0)\n","Requirement already satisfied: absl-py>=0.4.0 in /usr/local/lib/python3.7/dist-packages (from tensorflow) (1.2.0)\n","Requirement already satisfied: wrapt>=1.11.0 in /usr/local/lib/python3.7/dist-packages (from tensorflow) (1.14.1)\n","Requirement already satisfied: tensorflow-io-gcs-filesystem>=0.23.1 in /usr/local/lib/python3.7/dist-packages (from tensorflow) (0.26.0)\n","Requirement already satisfied: protobuf<3.20,>=3.9.2 in /usr/local/lib/python3.7/dist-packages (from tensorflow) (3.17.3)\n","Requirement already satisfied: typing-extensions>=3.6.6 in /usr/local/lib/python3.7/dist-packages (from tensorflow) (4.1.1)\n","Requirement already satisfied: astunparse>=1.6.0 in /usr/local/lib/python3.7/dist-packages (from tensorflow) (1.6.3)\n","Requirement already satisfied: termcolor>=1.1.0 in /usr/local/lib/python3.7/dist-packages (from tensorflow) (1.1.0)\n","Requirement already satisfied: six>=1.12.0 in /usr/local/lib/python3.7/dist-packages (from tensorflow) (1.15.0)\n","Requirement already satisfied: h5py>=2.9.0 in /usr/local/lib/python3.7/dist-packages (from tensorflow) (3.1.0)\n","Requirement already satisfied: wheel<1.0,>=0.23.0 in /usr/local/lib/python3.7/dist-packages (from astunparse>=1.6.0->tensorflow) (0.37.1)\n","Requirement already satisfied: cached-property in /usr/local/lib/python3.7/dist-packages (from h5py>=2.9.0->tensorflow) (1.5.2)\n","Requirement already satisfied: google-auth<3,>=1.6.3 in /usr/local/lib/python3.7/dist-packages (from tensorboard<2.9,>=2.8->tensorflow) (1.35.0)\n","Requirement already satisfied: requests<3,>=2.21.0 in /usr/local/lib/python3.7/dist-packages (from tensorboard<2.9,>=2.8->tensorflow) (2.23.0)\n","Requirement already satisfied: tensorboard-plugin-wit>=1.6.0 in /usr/local/lib/python3.7/dist-packages (from tensorboard<2.9,>=2.8->tensorflow) (1.8.1)\n","Requirement already satisfied: werkzeug>=0.11.15 in /usr/local/lib/python3.7/dist-packages (from tensorboard<2.9,>=2.8->tensorflow) (1.0.1)\n","Requirement already satisfied: markdown>=2.6.8 in /usr/local/lib/python3.7/dist-packages (from tensorboard<2.9,>=2.8->tensorflow) (3.4.1)\n","Requirement already satisfied: google-auth-oauthlib<0.5,>=0.4.1 in /usr/local/lib/python3.7/dist-packages (from tensorboard<2.9,>=2.8->tensorflow) (0.4.6)\n","Requirement already satisfied: tensorboard-data-server<0.7.0,>=0.6.0 in /usr/local/lib/python3.7/dist-packages (from tensorboard<2.9,>=2.8->tensorflow) (0.6.1)\n","Requirement already satisfied: pyasn1-modules>=0.2.1 in /usr/local/lib/python3.7/dist-packages (from google-auth<3,>=1.6.3->tensorboard<2.9,>=2.8->tensorflow) (0.2.8)\n","Requirement already satisfied: cachetools<5.0,>=2.0.0 in /usr/local/lib/python3.7/dist-packages (from google-auth<3,>=1.6.3->tensorboard<2.9,>=2.8->tensorflow) (4.2.4)\n","Requirement already satisfied: rsa<5,>=3.1.4 in /usr/local/lib/python3.7/dist-packages (from google-auth<3,>=1.6.3->tensorboard<2.9,>=2.8->tensorflow) (4.9)\n","Requirement already satisfied: requests-oauthlib>=0.7.0 in /usr/local/lib/python3.7/dist-packages (from google-auth-oauthlib<0.5,>=0.4.1->tensorboard<2.9,>=2.8->tensorflow) (1.3.1)\n","Requirement already satisfied: importlib-metadata>=4.4 in /usr/local/lib/python3.7/dist-packages (from markdown>=2.6.8->tensorboard<2.9,>=2.8->tensorflow) (4.12.0)\n","Requirement already satisfied: zipp>=0.5 in /usr/local/lib/python3.7/dist-packages (from importlib-metadata>=4.4->markdown>=2.6.8->tensorboard<2.9,>=2.8->tensorflow) (3.8.1)\n","Requirement already satisfied: pyasn1<0.5.0,>=0.4.6 in /usr/local/lib/python3.7/dist-packages (from pyasn1-modules>=0.2.1->google-auth<3,>=1.6.3->tensorboard<2.9,>=2.8->tensorflow) (0.4.8)\n","Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.7/dist-packages (from requests<3,>=2.21.0->tensorboard<2.9,>=2.8->tensorflow) (2022.6.15)\n","Requirement already satisfied: chardet<4,>=3.0.2 in /usr/local/lib/python3.7/dist-packages (from requests<3,>=2.21.0->tensorboard<2.9,>=2.8->tensorflow) (3.0.4)\n","Requirement already satisfied: idna<3,>=2.5 in /usr/local/lib/python3.7/dist-packages (from requests<3,>=2.21.0->tensorboard<2.9,>=2.8->tensorflow) (2.10)\n","Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in /usr/local/lib/python3.7/dist-packages (from requests<3,>=2.21.0->tensorboard<2.9,>=2.8->tensorflow) (1.24.3)\n","Requirement already satisfied: oauthlib>=3.0.0 in /usr/local/lib/python3.7/dist-packages (from requests-oauthlib>=0.7.0->google-auth-oauthlib<0.5,>=0.4.1->tensorboard<2.9,>=2.8->tensorflow) (3.2.0)\n","Looking in indexes: https://pypi.org/simple, https://us-python.pkg.dev/colab-wheels/public/simple/\n","Requirement already satisfied: keras-visualizer in /usr/local/lib/python3.7/dist-packages (2.4)\n"]}]},{"cell_type":"markdown","metadata":{"id":"Ov3GzLiQiRvh"},"source":[""]},{"cell_type":"code","metadata":{"id":"vI3-fr4mcqQG","colab":{"base_uri":"https://localhost:8080/"},"executionInfo":{"status":"ok","timestamp":1660526030078,"user_tz":420,"elapsed":25,"user":{"displayName":"Leo Huang","userId":"16558901284710269921"}},"outputId":"9750d2ca-1a24-42a3-8427-60bf0b4ce064"},"source":["%tensorflow_version 2.x"],"execution_count":6,"outputs":[{"output_type":"stream","name":"stdout","text":["Colab only includes TensorFlow 2.x; %tensorflow_version has no effect.\n"]}]},{"cell_type":"code","metadata":{"colab":{"base_uri":"https://localhost:8080/"},"id":"lAecUByCczdt","executionInfo":{"status":"ok","timestamp":1660526030078,"user_tz":420,"elapsed":20,"user":{"displayName":"Leo Huang","userId":"16558901284710269921"}},"outputId":"5a5df2d5-1b01-4b2e-f167-edd892141fbf"},"source":["import numpy as np\n","import tensorflow as tf\n","print(tf.version)"],"execution_count":7,"outputs":[{"output_type":"stream","name":"stdout","text":["<module 'tensorflow._api.v2.version' from '/usr/local/lib/python3.7/dist-packages/tensorflow/_api/v2/version/__init__.py'>\n"]}]},{"cell_type":"markdown","metadata":{"id":"KyKf29jtdUP7"},"source":["###Tensors \n","Tensors are a higher dimensional vector in different shapes. All these tensors are scalar, having one value\n"]},{"cell_type":"code","metadata":{"id":"76VyfkqVc7Qa","executionInfo":{"status":"ok","timestamp":1660526030079,"user_tz":420,"elapsed":19,"user":{"displayName":"Leo Huang","userId":"16558901284710269921"}}},"source":["string = tf.Variable(\"str\", tf.string)\n","number = tf.Variable(15, tf.int16)\n","flt = tf.Variable(3.1415, tf.int64)"],"execution_count":8,"outputs":[]},{"cell_type":"markdown","metadata":{"id":"1IywSsfve0yu"},"source":["### Rank of Tensors\n","The rank of tensors is dependant on the linear algebra definition of rank in a matrix or the deepest level of a nested list."]},{"cell_type":"code","metadata":{"id":"KSpN1gawehxX","executionInfo":{"status":"ok","timestamp":1660526030079,"user_tz":420,"elapsed":18,"user":{"displayName":"Leo Huang","userId":"16558901284710269921"}}},"source":["rank_1 = tf.Variable([\"one\",\"two\", \"three\"], tf.string)\n","rank_2 = tf.Variable([[\"one\",\"two\", \"three\"], [\"four\", \"five\", \"six\"]], tf.string)"],"execution_count":9,"outputs":[]},{"cell_type":"code","metadata":{"colab":{"base_uri":"https://localhost:8080/"},"id":"dqEVbp2DeiMK","executionInfo":{"status":"ok","timestamp":1660526030080,"user_tz":420,"elapsed":18,"user":{"displayName":"Leo Huang","userId":"16558901284710269921"}},"outputId":"69813846-7956-4965-8a4a-d883480c7255"},"source":["tf.rank(rank_2)"],"execution_count":10,"outputs":[{"output_type":"execute_result","data":{"text/plain":["<tf.Tensor: shape=(), dtype=int32, numpy=2>"]},"metadata":{},"execution_count":10}]},{"cell_type":"markdown","metadata":{"id":"FuNSoCECfXCR"},"source":["### Shape of Tensors\n","The shape of a tensor is how many values it has in each dimension. If there is only one dimension, then the shape function will only output one number."]},{"cell_type":"code","metadata":{"colab":{"base_uri":"https://localhost:8080/"},"id":"_ImdCMrDfwIP","executionInfo":{"status":"ok","timestamp":1660526030080,"user_tz":420,"elapsed":16,"user":{"displayName":"Leo Huang","userId":"16558901284710269921"}},"outputId":"b40ffdfe-a79b-4071-98ac-fc4c97c86b87"},"source":["rank_2.shape"],"execution_count":11,"outputs":[{"output_type":"execute_result","data":{"text/plain":["TensorShape([2, 3])"]},"metadata":{},"execution_count":11}]},{"cell_type":"markdown","metadata":{"id":"uGX1gAbFf3gJ"},"source":["### Manipulating Tensors"]},{"cell_type":"code","metadata":{"id":"zCCDw1VTjtjN","executionInfo":{"status":"ok","timestamp":1660526030080,"user_tz":420,"elapsed":14,"user":{"displayName":"Leo Huang","userId":"16558901284710269921"}}},"source":["first = tf.ones([1,2,3])\n","second = tf.reshape(first, [2,3,1])\n","third = tf.reshape(second, [3, -1]) #-1 tells the tensor to calculate the size of the dimension in that place\n","#the number of elements in the reshaped tensor must be the same as the original tensor"],"execution_count":12,"outputs":[]},{"cell_type":"code","metadata":{"colab":{"base_uri":"https://localhost:8080/"},"id":"lwuOxPYGkAaL","executionInfo":{"status":"ok","timestamp":1660526030081,"user_tz":420,"elapsed":14,"user":{"displayName":"Leo Huang","userId":"16558901284710269921"}},"outputId":"42a790a5-8d2c-478a-d702-8dc6521dfc73"},"source":["print(first)\n","print(second)\n","print(third)"],"execution_count":13,"outputs":[{"output_type":"stream","name":"stdout","text":["tf.Tensor(\n","[[[1. 1. 1.]\n"," [1. 1. 1.]]], shape=(1, 2, 3), dtype=float32)\n","tf.Tensor(\n","[[[1.]\n"," [1.]\n"," [1.]]\n","\n"," [[1.]\n"," [1.]\n"," [1.]]], shape=(2, 3, 1), dtype=float32)\n","tf.Tensor(\n","[[1. 1.]\n"," [1. 1.]\n"," [1. 1.]], shape=(3, 2), dtype=float32)\n"]}]},{"cell_type":"markdown","metadata":{"id":"s7HZlH6qnf03"},"source":["### Neural Network Time"]},{"cell_type":"code","metadata":{"id":"-QVKXHNSkp3n","executionInfo":{"status":"ok","timestamp":1660526030081,"user_tz":420,"elapsed":13,"user":{"displayName":"Leo Huang","userId":"16558901284710269921"}}},"source":["from tensorflow import keras\n","import numpy as np\n","import matplotlib.pyplot as plt\n","from keras import models \n","from keras.layers import Dense, Conv2D, MaxPooling2D, Flatten, Activation \n","from keras_visualizer import visualizer \n","from keras import layers \n"],"execution_count":14,"outputs":[]},{"cell_type":"code","metadata":{"id":"A9UTQFD9nkjQ","executionInfo":{"status":"ok","timestamp":1660526030918,"user_tz":420,"elapsed":850,"user":{"displayName":"Leo Huang","userId":"16558901284710269921"}},"colab":{"base_uri":"https://localhost:8080/"},"outputId":"168c8c3e-5df2-4065-b185-a4904a9cce30"},"source":["fashion_mnist = keras.datasets.fashion_mnist # load dataset\n","\n","(train_images, train_labels), (test_images, test_labels) = fashion_mnist.load_data() # split into tetsing and training"],"execution_count":15,"outputs":[{"output_type":"stream","name":"stdout","text":["Downloading data from https://storage.googleapis.com/tensorflow/tf-keras-datasets/train-labels-idx1-ubyte.gz\n","32768/29515 [=================================] - 0s 0us/step\n","40960/29515 [=========================================] - 0s 0us/step\n","Downloading data from https://storage.googleapis.com/tensorflow/tf-keras-datasets/train-images-idx3-ubyte.gz\n","26427392/26421880 [==============================] - 0s 0us/step\n","26435584/26421880 [==============================] - 0s 0us/step\n","Downloading data from https://storage.googleapis.com/tensorflow/tf-keras-datasets/t10k-labels-idx1-ubyte.gz\n","16384/5148 [===============================================================================================] - 0s 0us/step\n","Downloading data from https://storage.googleapis.com/tensorflow/tf-keras-datasets/t10k-images-idx3-ubyte.gz\n","4423680/4422102 [==============================] - 0s 0us/step\n","4431872/4422102 [==============================] - 0s 0us/step\n"]}]},{"cell_type":"code","metadata":{"colab":{"base_uri":"https://localhost:8080/"},"id":"sCP2U4QhnqOu","executionInfo":{"status":"ok","timestamp":1660526030919,"user_tz":420,"elapsed":19,"user":{"displayName":"Leo Huang","userId":"16558901284710269921"}},"outputId":"f74ab28b-9777-4b5d-d95f-dfc0ffceb94e"},"source":["train_labels.shape"],"execution_count":16,"outputs":[{"output_type":"execute_result","data":{"text/plain":["(60000,)"]},"metadata":{},"execution_count":16}]},{"cell_type":"code","metadata":{"colab":{"base_uri":"https://localhost:8080/"},"id":"5Wru9VEMnsbq","executionInfo":{"status":"ok","timestamp":1660526030920,"user_tz":420,"elapsed":17,"user":{"displayName":"Leo Huang","userId":"16558901284710269921"}},"outputId":"057d032f-d572-4cd3-a426-136d112e4e1f"},"source":["train_images[0,23,23] # let's have a look at one pixel"],"execution_count":17,"outputs":[{"output_type":"execute_result","data":{"text/plain":["194"]},"metadata":{},"execution_count":17}]},{"cell_type":"markdown","metadata":{"id":"P84bEEManxKW"},"source":["Our pixel values are between 0 and 255, 0 being black and 255 being white. This means we have a grayscale image as there are no color channels."]},{"cell_type":"code","metadata":{"colab":{"base_uri":"https://localhost:8080/"},"id":"NIClz7MKnwXD","executionInfo":{"status":"ok","timestamp":1660526030921,"user_tz":420,"elapsed":14,"user":{"displayName":"Leo Huang","userId":"16558901284710269921"}},"outputId":"b2048056-9b1e-40e5-f9b6-fd5618cf0064"},"source":["train_labels[:10] # let's have a look at the first 10 training labels"],"execution_count":18,"outputs":[{"output_type":"execute_result","data":{"text/plain":["array([9, 0, 0, 3, 0, 2, 7, 2, 5, 5], dtype=uint8)"]},"metadata":{},"execution_count":18}]},{"cell_type":"code","metadata":{"id":"jpllCYp5n2CQ","executionInfo":{"status":"ok","timestamp":1660526030921,"user_tz":420,"elapsed":10,"user":{"displayName":"Leo Huang","userId":"16558901284710269921"}}},"source":["class_names = ['T-shirt/top', 'Trouser', 'Pullover', 'Dress', 'Coat',\n"," 'Sandal', 'Shirt', 'Sneaker', 'Bag', 'Ankle boot']"],"execution_count":19,"outputs":[]},{"cell_type":"code","metadata":{"colab":{"base_uri":"https://localhost:8080/","height":265},"id":"NvpXecbXn3wS","executionInfo":{"status":"ok","timestamp":1660526031387,"user_tz":420,"elapsed":232,"user":{"displayName":"Leo Huang","userId":"16558901284710269921"}},"outputId":"c6c4b18a-05b6-4078-ce44-dbef1eaef95c"},"source":["plt.figure()\n","plt.imshow(train_images[10], cmap='gray')\n","plt.colorbar()\n","plt.grid(False)\n","plt.show()"],"execution_count":20,"outputs":[{"output_type":"display_data","data":{"text/plain":["<Figure size 432x288 with 2 Axes>"],"image/png":"iVBORw0KGgoAAAANSUhEUgAAATEAAAD4CAYAAACE9dGgAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4yLjIsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+WH4yJAAAZ80lEQVR4nO3db4xc1Znn8e8vgP8bbOM/2Ma7dogBOZOMSRwgISBQsqyDVjLkhRVeZLwTMiYSKCHJi2WQoiCtIqFVIMxIs0QmoDgSJIsELCgik3isSAyJho3tWDbgHbCMHdvYbmwTbOPYpM2zL+r2puzqOqe6q7qrTvfvI5W66j51656+3f30vec+9xxFBGZmpfpQtxtgZtYOJzEzK5qTmJkVzUnMzIrmJGZmRTt/NDcmaUxeCv3Qh9L/CxYsWJCMT5s2LRk/cuRIMv72228n46WaOXNmMj579uxk/N13320a6+vrG1abShARamf9lStXxuHDh1t67+bNm38ZESvb2V672kpiklYC/wCcB/woIh7oSKsKM3ny5GT8W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V+tvOAxyPi1U5uQyUVtZmZncunk2ZWNCcxMytaV5LYSN+G0A5JuyVtl7T1nPqXbrTlcUl9kl6pWzZL0gZJb1Rfm086Ofptu1/S/mrfbZV0S5fatkjSryW9JulVSd+olnd13yXa1RP7rVSj3idW3YbwOvCfqBW+/Q64PSI6VsHbDkm7gRUR0fWiTUk3ACeAn0TEX1XL/gdwNCIeqP4BzIyI/9YjbbsfOBER3x/t9pzTtvnA/IjYImk6sBm4FfivdHHfJdq1mh7Yb6XqxpHY/78NISLeBwZuQ7BzRMSLwNFzFq8C1lfP11P7Ixh1TdrWEyLiQERsqZ4fB3ZQqxzv6r5LtMva0I0kNthtCL30gwzgV5I2S1rb7cYMYl5EHKieHwTmdbMxg7hb0rbqdLMrp7r1JC0GrgJepof23Tntgh7bbyVxx36jz0bEJ6jddX9XddrUk6LWF9BLNTKPAJcBy4EDwKjeVHouSdOAp4F7IuJYfayb+26QdvXUfitNN5LYiN+G0I6I2F997QOepXb620sOVX0rA30s6VlGRlFEHIqIMxHxAfAoXdx3ki6gliieiIhnqsVd33eDtauX9luJupHERvw2hOGSNLXqcEXSVOBm4JX0WqPueWBN9XwN8FwX23KWgQRRuY0u7TtJAh4DdkTEQ3Whru67Zu3qlf1Wqq5U7FeXkB/mL7chfG/UGzEISR+mdvQFtVuynuxm2yT9FLiR2rAoh4DvAv8beAr4D9SGNVodEaPewd6kbTdSOyUKYDdwZ10f1Gi27bPAvwLbgYGBse6j1v/UtX2XaNft9MB+K5VvOzKzorlj38yK5iRmZkVzEjOzojmJmVnRnMTMrGhOYmZWNCcxMyva/wNiJ18uMjSTsAAAAABJRU5ErkJggg==\n"},"metadata":{"needs_background":"light"}}]},{"cell_type":"markdown","metadata":{"id":"3Gkz-tten7OI"},"source":["###Data Preprocessing\n","We want values to be between 0 and 1 as opposed to being between 0 and 255"]},{"cell_type":"code","metadata":{"id":"4Wbbu5dyn564","executionInfo":{"status":"ok","timestamp":1660526034381,"user_tz":420,"elapsed":409,"user":{"displayName":"Leo Huang","userId":"16558901284710269921"}}},"source":["train_images = train_images / 255.0\n","\n","test_images = test_images / 255.0"],"execution_count":21,"outputs":[]},{"cell_type":"markdown","metadata":{"id":"0j_xEohKoGbS"},"source":["#Building the Model"]},{"cell_type":"code","metadata":{"id":"6Y8cO5qioJUz","executionInfo":{"status":"ok","timestamp":1660526042673,"user_tz":420,"elapsed":1038,"user":{"displayName":"Leo Huang","userId":"16558901284710269921"}}},"source":["model = keras.Sequential([\n"," keras.layers.Flatten(input_shape=(28, 28)), # input layer (1)\n"," keras.layers.Dense(128, activation='relu'), # hidden layer (2)\n"," keras.layers.Dense(128, activation='relu'),\n"," keras.layers.Dense(10, activation='softmax') # output layer (3)\n","])"],"execution_count":22,"outputs":[]},{"cell_type":"markdown","metadata":{"id":"IvX_AFI8oMP-"},"source":["#Compiling and Training the Model"]},{"cell_type":"code","metadata":{"colab":{"base_uri":"https://localhost:8080/"},"id":"OcAcZWq2oOU1","executionInfo":{"status":"ok","timestamp":1660526140088,"user_tz":420,"elapsed":97023,"user":{"displayName":"Leo Huang","userId":"16558901284710269921"}},"outputId":"67cae10d-b043-48f1-cdb1-8196300ea121"},"source":["model.compile(optimizer='adam',\n"," loss='sparse_categorical_crossentropy',\n"," metrics=['accuracy'])\n","model.fit(train_images, train_labels, epochs=20) # we pass the data, labels and epochs and watch the magic!"],"execution_count":23,"outputs":[{"output_type":"stream","name":"stdout","text":["Epoch 1/20\n","1875/1875 [==============================] - 8s 2ms/step - loss: 0.4870 - accuracy: 0.8264\n","Epoch 2/20\n","1875/1875 [==============================] - 4s 2ms/step - loss: 0.3659 - accuracy: 0.8657\n","Epoch 3/20\n","1875/1875 [==============================] - 5s 3ms/step - loss: 0.3295 - accuracy: 0.8793\n","Epoch 4/20\n","1875/1875 [==============================] - 4s 2ms/step - loss: 0.3070 - accuracy: 0.8862\n","Epoch 5/20\n","1875/1875 [==============================] - 4s 2ms/step - loss: 0.2905 - accuracy: 0.8922\n","Epoch 6/20\n","1875/1875 [==============================] - 5s 2ms/step - loss: 0.2726 - accuracy: 0.8979\n","Epoch 7/20\n","1875/1875 [==============================] - 5s 2ms/step - loss: 0.2617 - accuracy: 0.9017\n","Epoch 8/20\n","1875/1875 [==============================] - 4s 2ms/step - loss: 0.2515 - accuracy: 0.9055\n","Epoch 9/20\n","1875/1875 [==============================] - 4s 2ms/step - loss: 0.2406 - accuracy: 0.9093\n","Epoch 10/20\n","1875/1875 [==============================] - 4s 2ms/step - loss: 0.2296 - accuracy: 0.9135\n","Epoch 11/20\n","1875/1875 [==============================] - 4s 2ms/step - loss: 0.2231 - accuracy: 0.9154\n","Epoch 12/20\n","1875/1875 [==============================] - 4s 2ms/step - loss: 0.2124 - accuracy: 0.9197\n","Epoch 13/20\n","1875/1875 [==============================] - 8s 4ms/step - loss: 0.2075 - accuracy: 0.9209\n","Epoch 14/20\n","1875/1875 [==============================] - 5s 2ms/step - loss: 0.2017 - accuracy: 0.9234\n","Epoch 15/20\n","1875/1875 [==============================] - 4s 2ms/step - loss: 0.1950 - accuracy: 0.9257\n","Epoch 16/20\n","1875/1875 [==============================] - 4s 2ms/step - loss: 0.1875 - accuracy: 0.9275\n","Epoch 17/20\n","1875/1875 [==============================] - 4s 2ms/step - loss: 0.1836 - accuracy: 0.9297\n","Epoch 18/20\n","1875/1875 [==============================] - 4s 2ms/step - loss: 0.1803 - accuracy: 0.9309\n","Epoch 19/20\n","1875/1875 [==============================] - 5s 3ms/step - loss: 0.1712 - accuracy: 0.9344\n","Epoch 20/20\n","1875/1875 [==============================] - 4s 2ms/step - loss: 0.1676 - accuracy: 0.9355\n"]},{"output_type":"execute_result","data":{"text/plain":["<keras.callbacks.History at 0x7f04667a8090>"]},"metadata":{},"execution_count":23}]},{"cell_type":"markdown","metadata":{"id":"y0S_DO7_oWX7"},"source":["#Evaluating the Model"]},{"cell_type":"code","metadata":{"colab":{"base_uri":"https://localhost:8080/"},"id":"bb5zq1xGoYx2","executionInfo":{"status":"ok","timestamp":1660526655958,"user_tz":420,"elapsed":1105,"user":{"displayName":"Leo Huang","userId":"16558901284710269921"}},"outputId":"ac637478-b7c6-472a-d10f-eff5b4aafa08"},"source":["test_loss, test_acc = model.evaluate(test_images, test_labels, verbose=1) \n"," \n","print('Test accuracy:', test_acc)"],"execution_count":24,"outputs":[{"output_type":"stream","name":"stdout","text":["313/313 [==============================] - 1s 2ms/step - loss: 0.3880 - accuracy: 0.8868\n","Test accuracy: 0.8867999911308289\n"]}]},{"cell_type":"markdown","metadata":{"id":"DUOqhBAcwjnY"},"source":["###Why do you think the test accuracy is different than the training accuracy? (It should be lower)"]},{"cell_type":"markdown","metadata":{"id":"vU6SszEmpLe6"},"source":["#Making Predictions"]},{"cell_type":"code","metadata":{"id":"Hxu1nVXfpNuO","colab":{"base_uri":"https://localhost:8080/","height":399},"executionInfo":{"status":"ok","timestamp":1660526708096,"user_tz":420,"elapsed":49770,"user":{"displayName":"Leo Huang","userId":"16558901284710269921"}},"outputId":"4e989b8a-4e0d-4513-8dbd-d8eae073dc27"},"source":["predictions = model.predict(test_images)\n","COLOR = 'white'\n","plt.rcParams['text.color'] = COLOR\n","plt.rcParams['axes.labelcolor'] = COLOR\n","\n","def predict(model, image, correct_label):\n"," class_names = ['T-shirt/top', 'Trouser', 'Pullover', 'Dress', 'Coat',\n"," 'Sandal', 'Shirt', 'Sneaker', 'Bag', 'Ankle boot']\n"," prediction = model.predict(np.array([image]))\n"," print(prediction)\n"," predicted_class = class_names[np.argmax(prediction)]\n"," print(predicted_class)\n","\n"," show_image(image, class_names[correct_label], predicted_class)\n","\n","\n","def show_image(img, label, guess):\n"," plt.figure()\n"," plt.imshow(img, cmap=plt.cm.binary)\n"," plt.title(\"Expected: \" + label)\n"," plt.xlabel(\"Guess: \" + guess)\n"," plt.colorbar()\n"," plt.grid(False)\n"," plt.show()\n"," print(\"Expected: \" + label)\n"," print(\"Guess: \" + guess)\n","\n","\n","def get_number():\n"," while True:\n"," num = input(\"Pick a number: \")\n"," if num.isdigit():\n"," num = int(num)\n"," if 0 <= num <= 1000:\n"," return int(num)\n"," else:\n"," print(\"Try again...\")\n","\n","num = get_number()\n","image = test_images[num]\n","label = test_labels[num]\n","predict(model, image, label)"],"execution_count":25,"outputs":[{"output_type":"stream","name":"stdout","text":["Pick a number: 9\n","[[3.0168400e-15 1.4688141e-10 4.5059637e-11 3.4800697e-13 3.6843372e-11\n"," 2.9466041e-09 4.5187184e-11 1.0000000e+00 3.9343149e-13 2.3113718e-11]]\n","Sneaker\n"]},{"output_type":"display_data","data":{"text/plain":["<Figure size 432x288 with 2 Axes>"],"image/png":"iVBORw0KGgoAAAANSUhEUgAAAS4AAAEWCAYAAADYaXqDAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4yLjIsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+WH4yJAAAe30lEQVR4nO3de5hV1Znn8e9LgTdARUGHQCFeiBHvptA4aoKjsVE7XibqiN1p6bFD0hNM7KS7dWyjtjOdMTHRTo9GxUhrHCNqxxhi8BaMg/YTETBeACVUsBQQBFRuXsCSt/9Yu8Kmqs7ap+qcqnNW+fs8z3nqnP3uyzqbqpe11l57bXN3RERS0q/WBRAR6SolLhFJjhKXiCRHiUtEkqPEJSLJUeISkeQocUl7k4Cna12IAqMBB/rXuBxSI0pclWsB3gc25V431rA8TwJ/1YvHuwh4BdgIvAnMBAb34vHlY0j/Y1XHF4Bf17oQNfA54DvABOB3wB6Ec5GK/kBrrQshXacaV8+6GfhZ7vN3gVmAAeOB5cDlwFpCze3PcuvuCHwfeJ1Qk7kF2DkXPxN4HtgA/IGQPP4JOIFQ48vX/D4FPA68DSwGzsvtZ09gRrafZ4H9u/D9xgG/JSQtsv3fSah9AdwB3AT8Kls2p93+Y+U6PdvvBmAZcHWkHF8knL9DCL/TlxHOyVvAfYSECtuamBcRzusTZX5PqTfurldlrxZ3P7lEbBd3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6w9bQ6jN3MO25tQVhE71XxCSoRH6vSB0nI/Jls0i9CeV6uMaQOjU/wSh2bmGUGOL+TGh2fhcdow12fe6m9A/9hKhFvlKu+3eBf6UUKvbBPwZYXK9K7JyTM/KKgJodggRSZCaiiKSHCUuEUmOEpeIJEeJS0SSo8QlIslR4hKR5ChxiUhy/gOZUkRHbJw8wgAAAABJRU5ErkJggg==\n"},"metadata":{"needs_background":"light"}},{"output_type":"stream","name":"stdout","text":["Expected: Sneaker\n","Guess: Sneaker\n"]}]},{"cell_type":"code","source":[""],"metadata":{"id":"bTK7K14-SLVH"},"execution_count":null,"outputs":[]}]}