Make notebooks 10 and 11 runnable in Colab without changes
parent
ec3a011ec9
commit
f810964f51
|
@ -9,6 +9,17 @@
|
||||||
"_This notebook contains all the sample code and solutions to the exercises in chapter 10._"
|
"_This notebook contains all the sample code and solutions to the exercises in chapter 10._"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"metadata": {},
|
||||||
|
"source": [
|
||||||
|
"<table align=\"left\">\n",
|
||||||
|
" <td>\n",
|
||||||
|
" <a target=\"_blank\" href=\"https://colab.research.google.com/github/ageron/handson-ml2/blob/master/10_neural_nets_with_keras.ipynb\"><img src=\"https://www.tensorflow.org/images/colab_logo_32px.png\" />Run in Google Colab</a>\n",
|
||||||
|
" </td>\n",
|
||||||
|
"</table>"
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "markdown",
|
"cell_type": "markdown",
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
|
@ -20,7 +31,7 @@
|
||||||
"cell_type": "markdown",
|
"cell_type": "markdown",
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"source": [
|
"source": [
|
||||||
"First, let's import a few common modules, ensure MatplotLib plots figures inline and prepare a function to save the figures. We also check that Python 3.5 or later is installed (although Python 2.x may work, it is deprecated so we strongly recommend you use Python 3 instead), as well as Scikit-Learn ≥0.20 and TensorFlow ≥2.0-preview."
|
"First, let's import a few common modules, ensure MatplotLib plots figures inline and prepare a function to save the figures. We also check that Python 3.5 or later is installed (although Python 2.x may work, it is deprecated so we strongly recommend you use Python 3 instead), as well as Scikit-Learn ≥0.20 and TensorFlow ≥2.0."
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -37,7 +48,13 @@
|
||||||
"import sklearn\n",
|
"import sklearn\n",
|
||||||
"assert sklearn.__version__ >= \"0.20\"\n",
|
"assert sklearn.__version__ >= \"0.20\"\n",
|
||||||
"\n",
|
"\n",
|
||||||
"# TensorFlow ≥2.0-preview is required\n",
|
"try:\n",
|
||||||
|
" # %tensorflow_version only exists in Colab.\n",
|
||||||
|
" %tensorflow_version 2.x\n",
|
||||||
|
"except Exception:\n",
|
||||||
|
" pass\n",
|
||||||
|
"\n",
|
||||||
|
"# TensorFlow ≥2.0 is required\n",
|
||||||
"import tensorflow as tf\n",
|
"import tensorflow as tf\n",
|
||||||
"assert tf.__version__ >= \"2.0\"\n",
|
"assert tf.__version__ >= \"2.0\"\n",
|
||||||
"\n",
|
"\n",
|
||||||
|
@ -1632,7 +1649,7 @@
|
||||||
"name": "python",
|
"name": "python",
|
||||||
"nbconvert_exporter": "python",
|
"nbconvert_exporter": "python",
|
||||||
"pygments_lexer": "ipython3",
|
"pygments_lexer": "ipython3",
|
||||||
"version": "3.6.8"
|
"version": "3.7.3"
|
||||||
},
|
},
|
||||||
"nav_menu": {
|
"nav_menu": {
|
||||||
"height": "264px",
|
"height": "264px",
|
||||||
|
|
|
@ -14,6 +14,17 @@
|
||||||
"_This notebook contains all the sample code and solutions to the exercises in chapter 11._"
|
"_This notebook contains all the sample code and solutions to the exercises in chapter 11._"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"metadata": {},
|
||||||
|
"source": [
|
||||||
|
"<table align=\"left\">\n",
|
||||||
|
" <td>\n",
|
||||||
|
" <a target=\"_blank\" href=\"https://colab.research.google.com/github/ageron/handson-ml2/blob/master/11_training_deep_neural_networks.ipynb\"><img src=\"https://www.tensorflow.org/images/colab_logo_32px.png\" />Run in Google Colab</a>\n",
|
||||||
|
" </td>\n",
|
||||||
|
"</table>"
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "markdown",
|
"cell_type": "markdown",
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
|
@ -25,7 +36,7 @@
|
||||||
"cell_type": "markdown",
|
"cell_type": "markdown",
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"source": [
|
"source": [
|
||||||
"First, let's import a few common modules, ensure MatplotLib plots figures inline and prepare a function to save the figures. We also check that Python 3.5 or later is installed (although Python 2.x may work, it is deprecated so we strongly recommend you use Python 3 instead), as well as Scikit-Learn ≥0.20 and TensorFlow ≥2.0-preview."
|
"First, let's import a few common modules, ensure MatplotLib plots figures inline and prepare a function to save the figures. We also check that Python 3.5 or later is installed (although Python 2.x may work, it is deprecated so we strongly recommend you use Python 3 instead), as well as Scikit-Learn ≥0.20 and TensorFlow ≥2.0."
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -42,7 +53,13 @@
|
||||||
"import sklearn\n",
|
"import sklearn\n",
|
||||||
"assert sklearn.__version__ >= \"0.20\"\n",
|
"assert sklearn.__version__ >= \"0.20\"\n",
|
||||||
"\n",
|
"\n",
|
||||||
"# TensorFlow ≥2.0-preview is required\n",
|
"try:\n",
|
||||||
|
" # %tensorflow_version only exists in Colab.\n",
|
||||||
|
" %tensorflow_version 2.x\n",
|
||||||
|
"except Exception:\n",
|
||||||
|
" pass\n",
|
||||||
|
"\n",
|
||||||
|
"# TensorFlow ≥2.0 is required\n",
|
||||||
"import tensorflow as tf\n",
|
"import tensorflow as tf\n",
|
||||||
"from tensorflow import keras\n",
|
"from tensorflow import keras\n",
|
||||||
"assert tf.__version__ >= \"2.0\"\n",
|
"assert tf.__version__ >= \"2.0\"\n",
|
||||||
|
@ -2618,7 +2635,7 @@
|
||||||
"name": "python",
|
"name": "python",
|
||||||
"nbconvert_exporter": "python",
|
"nbconvert_exporter": "python",
|
||||||
"pygments_lexer": "ipython3",
|
"pygments_lexer": "ipython3",
|
||||||
"version": "3.7.4"
|
"version": "3.7.3"
|
||||||
},
|
},
|
||||||
"nav_menu": {
|
"nav_menu": {
|
||||||
"height": "360px",
|
"height": "360px",
|
||||||
|
|
Loading…
Reference in New Issue