"...text-generation-inference.git" did not exist on "611e21cb137e08b0b9a35c76676eb46de9d30627"
Commit ff482a06 authored by Billy Lamberta's avatar Billy Lamberta
Browse files

Add note about eager. Add web button.

parent 3738025c
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
}, },
"cell_type": "code", "cell_type": "code",
"source": [ "source": [
"#@title Licensed under the Apache License, Version 2.0 (the \"License\");\n", "#@title Licensed under the Apache License, Version 2.0 (the \"License\"); { display-mode: \"form\" }\n",
"# you may not use this file except in compliance with the License.\n", "# you may not use this file except in compliance with the License.\n",
"# You may obtain a copy of the License at\n", "# You may obtain a copy of the License at\n",
"#\n", "#\n",
...@@ -60,6 +60,16 @@ ...@@ -60,6 +60,16 @@
"execution_count": 0, "execution_count": 0,
"outputs": [] "outputs": []
}, },
{
"metadata": {
"id": "8Byow2J6LaPl",
"colab_type": "text"
},
"cell_type": "markdown",
"source": [
"# AutoGraph: Easy control flow for graphs "
]
},
{ {
"metadata": { "metadata": {
"id": "kGXS3UWBBNoc", "id": "kGXS3UWBBNoc",
...@@ -67,13 +77,17 @@ ...@@ -67,13 +77,17 @@
}, },
"cell_type": "markdown", "cell_type": "markdown",
"source": [ "source": [
"# AutoGraph: Easy control flow for graphs \n", "<table class=\"tfo-notebook-buttons\" align=\"left\">\n",
"\n", " <td>\n",
"<table class=\"tfo-notebook-buttons\" align=\"left\"><td>\n", " <a target=\"_blank\" href=\"https://www.tensorflow.org/guide/autograph\"><img src=\"https://www.tensorflow.org/images/tf_logo_32px.png\" />View on TensorFlow.org</a>\n",
"<a target=\"_blank\" href=\"https://colab.research.google.com/github/tensorflow/models/blob/master/samples/core/guide/autograph.ipynb\">\n", " </td>\n",
" <img src=\"https://www.tensorflow.org/images/colab_logo_32px.png\" />Run in Google Colab</a> \n", " <td>\n",
"</td><td>\n", " <a target=\"_blank\" href=\"https://colab.research.google.com/github/tensorflow/models/blob/master/samples/core/guide/autograph.ipynb\"><img src=\"https://www.tensorflow.org/images/colab_logo_32px.png\" />Run in Google Colab</a>\n",
"<a target=\"_blank\" href=\"https://github.com/tensorflow/models/blob/master/samples/core/guide/autograph.ipynb\"><img width=32px src=\"https://www.tensorflow.org/images/GitHub-Mark-32px.png\" />View source on GitHub</a></td></table>" " </td>\n",
" <td>\n",
" <a target=\"_blank\" href=\"https://github.com/tensorflow/models/blob/master/samples/core/guide/autograph.ipynb\"><img src=\"https://www.tensorflow.org/images/GitHub-Mark-32px.png\" />View source on GitHub</a>\n",
" </td>\n",
"</table>"
] ]
}, },
{ {
...@@ -123,7 +137,7 @@ ...@@ -123,7 +137,7 @@
}, },
"cell_type": "markdown", "cell_type": "markdown",
"source": [ "source": [
"Import TensorFlow and AutoGraph, any supporting modules, and enable [eager execution](https://www.tensorflow.org/guide/eager):" "Import TensorFlow, AutoGraph, and any supporting modules:"
] ]
}, },
{ {
...@@ -144,8 +158,34 @@ ...@@ -144,8 +158,34 @@
"import tensorflow as tf\n", "import tensorflow as tf\n",
"from tensorflow.contrib import autograph\n", "from tensorflow.contrib import autograph\n",
"\n", "\n",
"import matplotlib.pyplot as plt\n", "import matplotlib.pyplot as plt"
"\n", ],
"execution_count": 0,
"outputs": []
},
{
"metadata": {
"id": "Hh1PajmUJMNp",
"colab_type": "text"
},
"cell_type": "markdown",
"source": [
"We'll enable [eager execution](https://www.tensorflow.org/guide/eager) for demonstration purposes, but AutoGraph works in both eager and [graph execution](https://www.tensorflow.org/guide/graphs) environments:"
]
},
{
"metadata": {
"id": "ks_hiqcSJNvg",
"colab_type": "code",
"colab": {
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
},
"cell_type": "code",
"source": [
"tf.enable_eager_execution()" "tf.enable_eager_execution()"
], ],
"execution_count": 0, "execution_count": 0,
......
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