Commit 71ccd060 authored by Mark Daoust's avatar Mark Daoust
Browse files

Replace string activation with TensoFlow activations.

parent e06cea86
...@@ -5,8 +5,6 @@ ...@@ -5,8 +5,6 @@
"colab": { "colab": {
"name": "custom-training-walkthrough.ipynb", "name": "custom-training-walkthrough.ipynb",
"version": "0.3.2", "version": "0.3.2",
"views": {},
"default_view": {},
"provenance": [], "provenance": [],
"private_outputs": true, "private_outputs": true,
"collapsed_sections": [], "collapsed_sections": [],
...@@ -34,13 +32,7 @@ ...@@ -34,13 +32,7 @@
"metadata": { "metadata": {
"id": "CPII1rGR2rF9", "id": "CPII1rGR2rF9",
"colab_type": "code", "colab_type": "code",
"colab": { "colab": {}
"autoexec": {
"startup": false,
"wait_interval": 0
}
},
"cellView": "form"
}, },
"cell_type": "code", "cell_type": "code",
"source": [ "source": [
...@@ -70,10 +62,10 @@ ...@@ -70,10 +62,10 @@
"\n", "\n",
"\n", "\n",
"<table align=\"left\"><td>\n", "<table align=\"left\"><td>\n",
"<a target=\"_blank\" href=\"https://colab.sandbox.google.com/github/tensorflow/models/blob/master/samples/core/get_started/eager.ipynb\">\n", "<a target=\"_blank\" href=\"https://colab.sandbox.google.com/github/tensorflow/models/blob/master/samples/core/get_started/custom_training_walkthrough.ipynb\">\n",
" <img src=\"https://www.tensorflow.org/images/colab_logo_32px.png\" />Run in Google Colab</a> \n", " <img src=\"https://www.tensorflow.org/images/colab_logo_32px.png\" />Run in Google Colab</a> \n",
"</td><td>\n", "</td><td>\n",
"<a target=\"_blank\" href=\"https://github.com/tensorflow/models/blob/master/samples/core/get_started/eager.ipynb\"><img width=32px src=\"https://www.tensorflow.org/images/GitHub-Mark-32px.png\" />View source on Github</a></td></table>\n", "<a target=\"_blank\" href=\"https://github.com/tensorflow/models/blob/master/samples/core/get_started/custom_training_walkthrough.ipynb\"><img width=32px src=\"https://www.tensorflow.org/images/GitHub-Mark-32px.png\" />View source on Github</a></td></table>\n",
"\n" "\n"
] ]
}, },
...@@ -145,12 +137,7 @@ ...@@ -145,12 +137,7 @@
"metadata": { "metadata": {
"id": "jBmKxLVy9Uhg", "id": "jBmKxLVy9Uhg",
"colab_type": "code", "colab_type": "code",
"colab": { "colab": {}
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
}, },
"cell_type": "code", "cell_type": "code",
"source": [ "source": [
...@@ -177,12 +164,7 @@ ...@@ -177,12 +164,7 @@
"metadata": { "metadata": {
"id": "g4Wzg69bnwK2", "id": "g4Wzg69bnwK2",
"colab_type": "code", "colab_type": "code",
"colab": { "colab": {}
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
}, },
"cell_type": "code", "cell_type": "code",
"source": [ "source": [
...@@ -252,12 +234,7 @@ ...@@ -252,12 +234,7 @@
"metadata": { "metadata": {
"id": "J6c7uEU9rjRM", "id": "J6c7uEU9rjRM",
"colab_type": "code", "colab_type": "code",
"colab": { "colab": {}
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
}, },
"cell_type": "code", "cell_type": "code",
"source": [ "source": [
...@@ -287,12 +264,7 @@ ...@@ -287,12 +264,7 @@
"metadata": { "metadata": {
"id": "FQvb_JYdrpPm", "id": "FQvb_JYdrpPm",
"colab_type": "code", "colab_type": "code",
"colab": { "colab": {}
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
}, },
"cell_type": "code", "cell_type": "code",
"source": [ "source": [
...@@ -323,12 +295,7 @@ ...@@ -323,12 +295,7 @@
"metadata": { "metadata": {
"id": "9Edhevw7exl6", "id": "9Edhevw7exl6",
"colab_type": "code", "colab_type": "code",
"colab": { "colab": {}
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
}, },
"cell_type": "code", "cell_type": "code",
"source": [ "source": [
...@@ -364,12 +331,7 @@ ...@@ -364,12 +331,7 @@
"metadata": { "metadata": {
"id": "sVNlJlUOhkoX", "id": "sVNlJlUOhkoX",
"colab_type": "code", "colab_type": "code",
"colab": { "colab": {}
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
}, },
"cell_type": "code", "cell_type": "code",
"source": [ "source": [
...@@ -397,12 +359,7 @@ ...@@ -397,12 +359,7 @@
"metadata": { "metadata": {
"id": "WsxHnz1ebJ2S", "id": "WsxHnz1ebJ2S",
"colab_type": "code", "colab_type": "code",
"colab": { "colab": {}
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
}, },
"cell_type": "code", "cell_type": "code",
"source": [ "source": [
...@@ -434,12 +391,7 @@ ...@@ -434,12 +391,7 @@
"metadata": { "metadata": {
"id": "iDuG94H-C122", "id": "iDuG94H-C122",
"colab_type": "code", "colab_type": "code",
"colab": { "colab": {}
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
}, },
"cell_type": "code", "cell_type": "code",
"source": [ "source": [
...@@ -466,12 +418,7 @@ ...@@ -466,12 +418,7 @@
"metadata": { "metadata": {
"id": "me5Wn-9FcyyO", "id": "me5Wn-9FcyyO",
"colab_type": "code", "colab_type": "code",
"colab": { "colab": {}
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
}, },
"cell_type": "code", "cell_type": "code",
"source": [ "source": [
...@@ -502,12 +449,7 @@ ...@@ -502,12 +449,7 @@
"metadata": { "metadata": {
"id": "jm932WINcaGU", "id": "jm932WINcaGU",
"colab_type": "code", "colab_type": "code",
"colab": { "colab": {}
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
}, },
"cell_type": "code", "cell_type": "code",
"source": [ "source": [
...@@ -533,12 +475,7 @@ ...@@ -533,12 +475,7 @@
"metadata": { "metadata": {
"id": "ZbDkzGZIkpXf", "id": "ZbDkzGZIkpXf",
"colab_type": "code", "colab_type": "code",
"colab": { "colab": {}
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
}, },
"cell_type": "code", "cell_type": "code",
"source": [ "source": [
...@@ -561,12 +498,7 @@ ...@@ -561,12 +498,7 @@
"metadata": { "metadata": {
"id": "kex9ibEek6Tr", "id": "kex9ibEek6Tr",
"colab_type": "code", "colab_type": "code",
"colab": { "colab": {}
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
}, },
"cell_type": "code", "cell_type": "code",
"source": [ "source": [
...@@ -627,18 +559,13 @@ ...@@ -627,18 +559,13 @@
"metadata": { "metadata": {
"id": "2fZ6oL2ig3ZK", "id": "2fZ6oL2ig3ZK",
"colab_type": "code", "colab_type": "code",
"colab": { "colab": {}
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
}, },
"cell_type": "code", "cell_type": "code",
"source": [ "source": [
"model = tf.keras.Sequential([\n", "model = tf.keras.Sequential([\n",
" tf.keras.layers.Dense(10, activation=\"relu\", input_shape=(4,)), # input shape required\n", " tf.keras.layers.Dense(10, activation=tf.nn.relu, input_shape=(4,)), # input shape required\n",
" tf.keras.layers.Dense(10, activation=\"relu\"),\n", " tf.keras.layers.Dense(10, activation=tf.nn.relu),\n",
" tf.keras.layers.Dense(3)\n", " tf.keras.layers.Dense(3)\n",
"])" "])"
], ],
...@@ -673,12 +600,7 @@ ...@@ -673,12 +600,7 @@
"metadata": { "metadata": {
"id": "xe6SQ5NrpB-I", "id": "xe6SQ5NrpB-I",
"colab_type": "code", "colab_type": "code",
"colab": { "colab": {}
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
}, },
"cell_type": "code", "cell_type": "code",
"source": [ "source": [
...@@ -704,12 +626,7 @@ ...@@ -704,12 +626,7 @@
"metadata": { "metadata": {
"id": "_tRwHZmTNTX2", "id": "_tRwHZmTNTX2",
"colab_type": "code", "colab_type": "code",
"colab": { "colab": {}
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
}, },
"cell_type": "code", "cell_type": "code",
"source": [ "source": [
...@@ -732,12 +649,7 @@ ...@@ -732,12 +649,7 @@
"metadata": { "metadata": {
"id": "-Jzm_GoErz8B", "id": "-Jzm_GoErz8B",
"colab_type": "code", "colab_type": "code",
"colab": { "colab": {}
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
}, },
"cell_type": "code", "cell_type": "code",
"source": [ "source": [
...@@ -779,12 +691,7 @@ ...@@ -779,12 +691,7 @@
"metadata": { "metadata": {
"id": "tMAT4DcMPwI-", "id": "tMAT4DcMPwI-",
"colab_type": "code", "colab_type": "code",
"colab": { "colab": {}
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
}, },
"cell_type": "code", "cell_type": "code",
"source": [ "source": [
...@@ -813,12 +720,7 @@ ...@@ -813,12 +720,7 @@
"metadata": { "metadata": {
"id": "x57HcKWhKkei", "id": "x57HcKWhKkei",
"colab_type": "code", "colab_type": "code",
"colab": { "colab": {}
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
}, },
"cell_type": "code", "cell_type": "code",
"source": [ "source": [
...@@ -868,12 +770,7 @@ ...@@ -868,12 +770,7 @@
"metadata": { "metadata": {
"id": "8xxi2NNGKwG_", "id": "8xxi2NNGKwG_",
"colab_type": "code", "colab_type": "code",
"colab": { "colab": {}
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
}, },
"cell_type": "code", "cell_type": "code",
"source": [ "source": [
...@@ -898,12 +795,7 @@ ...@@ -898,12 +795,7 @@
"metadata": { "metadata": {
"id": "rxRNTFVe56RG", "id": "rxRNTFVe56RG",
"colab_type": "code", "colab_type": "code",
"colab": { "colab": {}
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
}, },
"cell_type": "code", "cell_type": "code",
"source": [ "source": [
...@@ -945,12 +837,7 @@ ...@@ -945,12 +837,7 @@
"metadata": { "metadata": {
"id": "AIgulGRUhpto", "id": "AIgulGRUhpto",
"colab_type": "code", "colab_type": "code",
"colab": { "colab": {}
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
}, },
"cell_type": "code", "cell_type": "code",
"source": [ "source": [
...@@ -1016,12 +903,7 @@ ...@@ -1016,12 +903,7 @@
"metadata": { "metadata": {
"id": "agjvNd2iUGFn", "id": "agjvNd2iUGFn",
"colab_type": "code", "colab_type": "code",
"colab": { "colab": {}
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
}, },
"cell_type": "code", "cell_type": "code",
"source": [ "source": [
...@@ -1101,12 +983,7 @@ ...@@ -1101,12 +983,7 @@
"metadata": { "metadata": {
"id": "Ps3_9dJ3Lodk", "id": "Ps3_9dJ3Lodk",
"colab_type": "code", "colab_type": "code",
"colab": { "colab": {}
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
}, },
"cell_type": "code", "cell_type": "code",
"source": [ "source": [
...@@ -1122,12 +999,7 @@ ...@@ -1122,12 +999,7 @@
"metadata": { "metadata": {
"id": "SRMWCu30bnxH", "id": "SRMWCu30bnxH",
"colab_type": "code", "colab_type": "code",
"colab": { "colab": {}
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
}, },
"cell_type": "code", "cell_type": "code",
"source": [ "source": [
...@@ -1160,12 +1032,7 @@ ...@@ -1160,12 +1032,7 @@
"metadata": { "metadata": {
"id": "Tw03-MK1cYId", "id": "Tw03-MK1cYId",
"colab_type": "code", "colab_type": "code",
"colab": { "colab": {}
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
}, },
"cell_type": "code", "cell_type": "code",
"source": [ "source": [
...@@ -1195,12 +1062,7 @@ ...@@ -1195,12 +1062,7 @@
"metadata": { "metadata": {
"id": "uNwt2eMeOane", "id": "uNwt2eMeOane",
"colab_type": "code", "colab_type": "code",
"colab": { "colab": {}
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
}, },
"cell_type": "code", "cell_type": "code",
"source": [ "source": [
...@@ -1231,12 +1093,7 @@ ...@@ -1231,12 +1093,7 @@
"metadata": { "metadata": {
"id": "kesTS5Lzv-M2", "id": "kesTS5Lzv-M2",
"colab_type": "code", "colab_type": "code",
"colab": { "colab": {}
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
}, },
"cell_type": "code", "cell_type": "code",
"source": [ "source": [
......
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