"[View in Colaboratory](https://colab.research.google.com/github/marksandler2/models/blob/master/research/slim/nets/mobilenet/mobilenet_example.ipynb)"
]
},
{
"metadata": {
"id": "aUVxY7xOGD1G",
"colab_type": "toc"
"colab_type": "toc",
"id": "aUVxY7xOGD1G"
},
"cell_type": "markdown",
"source": [
">[Prerequisites (downloading tensorflow_models and checkpoints)](#scrollTo=T_cETKXHDTXu)\n",
"\u003e[Prerequisites (downloading tensorflow_models and checkpoints)](#scrollTo=T_cETKXHDTXu)\n",
"\n",
">[Checkpoint based inference](#scrollTo=fxMe7_pkk_Vo)\n",
"\u003e[Checkpoint based inference](#scrollTo=fxMe7_pkk_Vo)\n",
"print('Successfully downloaded checkpoint from ', url,\n",
" '. It is available as', checkpoint)\n"
],
"execution_count": 2,
"outputs": [
{
"output_type": "stream",
"text": [
"Successfully downloaded checkpoint from https://storage.googleapis.com/mobilenet_v2/checkpoints/mobilenet_v2_1.0_224.tgz . It is available as mobilenet_v2_1.0_224.ckpt\n"
"Licensed under the Apache License, Version 2.0 (the \"License\");"
]
...
...
@@ -37,11 +41,11 @@
"wait_interval": 0
}
},
"cellView": "form"
"cellView": "code"
},
"cell_type": "code",
"source": [
"# Licensed under the Apache License, Version 2.0 (the \"License\");\n",
"#@title Licensed under the Apache License, Version 2.0 (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",
"#\n",
...
...
@@ -65,8 +69,22 @@
"source": [
"# Get Started with Eager Execution\n",
"\n",
"Note: you can run **[this notebook, live in Google Colab](https://colab.research.google.com/github/tensorflow/models/blob/master/samples/core/get_started/eager.ipynb)** with zero setup.\n",
" <img src=\"https://www.tensorflow.org/images/colab_logo_32px.png\" />Run in Google Colab</a> \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",
"\n"
]
},
{
"metadata": {
"id": "LDrzLFXE8T1l",
"colab_type": "text"
},
"cell_type": "markdown",
"source": [
"This tutorial describes how to use machine learning to *categorize* Iris flowers by species. It uses [TensorFlow](https://www.tensorflow.org)'s eager execution to (1) build a *model*, (2) *train* the model on example data, and (3) use the model to make *predictions* on unknown data. Machine learning experience isn't required to follow this guide, but you'll need to read some Python code.\n",
"\n",
"## TensorFlow programming\n",
...
...
@@ -114,7 +132,7 @@
"source": [
"### Install the latest version of TensorFlow\n",
"\n",
"This tutorial uses eager execution, which is available in [TensorFlow 1.7](https://www.tensorflow.org/install/). (You may need to restart the runtime after upgrading.)"
"This tutorial uses eager execution, which is available in [TensorFlow 1.8](https://www.tensorflow.org/install/). (You may need to restart the runtime after upgrading.)"
"The `grad` function uses the `loss` function and the [tfe.GradientTape](https://www.tensorflow.org/api_docs/python/tf/contrib/eager/GradientTape) to record operations that compute the *[gradients](https://developers.google.com/machine-learning/crash-course/glossary#gradient)* used to optimize our model. For more examples of this, see the [eager execution guide](https://www.tensorflow.org/programmers_guide/eager)."
"The `grad` function uses the `loss` function and the [tf.GradientTape](https://www.tensorflow.org/api_docs/python/tf/GradientTape) to record operations that compute the *[gradients](https://developers.google.com/machine-learning/crash-course/glossary#gradient)* used to optimize our model. For more examples of this, see the [eager execution guide](https://www.tensorflow.org/programmers_guide/eager)."