Commit 600200bf authored by Billy Lamberta's avatar Billy Lamberta
Browse files

replace activation strings with tf functions

parent 7bcae135
...@@ -154,7 +154,7 @@ ...@@ -154,7 +154,7 @@
}, },
{ {
"metadata": { "metadata": {
"id": "rBO43XtLjhCd", "id": "h3IKyzTCDNGo",
"colab_type": "code", "colab_type": "code",
"colab": { "colab": {
"autoexec": { "autoexec": {
...@@ -167,12 +167,12 @@ ...@@ -167,12 +167,12 @@
"source": [ "source": [
"model = tf.keras.models.Sequential([\n", "model = tf.keras.models.Sequential([\n",
" tf.keras.layers.Flatten(),\n", " tf.keras.layers.Flatten(),\n",
" tf.keras.layers.Dense(512, activation='relu'),\n", " tf.keras.layers.Dense(512, activation=tf.nn.relu),\n",
" tf.keras.layers.Dropout(0.2),\n", " tf.keras.layers.Dropout(0.2),\n",
" tf.keras.layers.Dense(10, activation='softmax')\n", " tf.keras.layers.Dense(10, activation=tf.nn.softmax)\n",
"])\n", "])\n",
"\n", "\n",
"model.compile(optimizer='adam', \n", "model.compile(optimizer='adam',\n",
" loss='sparse_categorical_crossentropy',\n", " loss='sparse_categorical_crossentropy',\n",
" metrics=['accuracy'])" " metrics=['accuracy'])"
], ],
...@@ -191,7 +191,7 @@ ...@@ -191,7 +191,7 @@
}, },
{ {
"metadata": { "metadata": {
"id": "cQnPHobsj0td", "id": "F7dTAzgHDUh7",
"colab_type": "code", "colab_type": "code",
"colab": { "colab": {
"autoexec": { "autoexec": {
...@@ -216,7 +216,7 @@ ...@@ -216,7 +216,7 @@
}, },
"cell_type": "markdown", "cell_type": "markdown",
"source": [ "source": [
"That’s it! You’ve just trained an image classifier with ~98% accuracy on this dataset. See [Get Started with TensorFlow](https://www.tensorflow.org/get_started/) to learn more." "You’ve now trained an image classifier with ~98% accuracy on this dataset. See [Get Started with TensorFlow](https://www.tensorflow.org/get_started/) to learn more."
] ]
} }
] ]
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment