diff --git a/10_neural_nets_with_keras.ipynb b/10_neural_nets_with_keras.ipynb index a49cc0e..3f622b6 100644 --- a/10_neural_nets_with_keras.ipynb +++ b/10_neural_nets_with_keras.ipynb @@ -9,6 +9,17 @@ "_This notebook contains all the sample code and solutions to the exercises in chapter 10._" ] }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n", + " \n", + "
\n", + " Run in Google Colab\n", + "
" + ] + }, { "cell_type": "markdown", "metadata": {}, @@ -20,7 +31,7 @@ "cell_type": "markdown", "metadata": {}, "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", "assert sklearn.__version__ >= \"0.20\"\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", "assert tf.__version__ >= \"2.0\"\n", "\n", @@ -1632,7 +1649,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.6.8" + "version": "3.7.3" }, "nav_menu": { "height": "264px", diff --git a/11_training_deep_neural_networks.ipynb b/11_training_deep_neural_networks.ipynb index f8fe953..5ad951f 100644 --- a/11_training_deep_neural_networks.ipynb +++ b/11_training_deep_neural_networks.ipynb @@ -14,6 +14,17 @@ "_This notebook contains all the sample code and solutions to the exercises in chapter 11._" ] }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n", + " \n", + "
\n", + " Run in Google Colab\n", + "
" + ] + }, { "cell_type": "markdown", "metadata": {}, @@ -25,7 +36,7 @@ "cell_type": "markdown", "metadata": {}, "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", "assert sklearn.__version__ >= \"0.20\"\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", "from tensorflow import keras\n", "assert tf.__version__ >= \"2.0\"\n", @@ -2618,7 +2635,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.7.4" + "version": "3.7.3" }, "nav_menu": { "height": "360px",