From 9e8a697ada4946b3b29fcd11555ad81b2b617c8a Mon Sep 17 00:00:00 2001 From: Shaikh Ali Mustufa Date: Tue, 28 Jul 2020 13:11:06 +0530 Subject: [PATCH 1/4] fix for colab Colab now supports TensorFlow2.x by default so the code breaks. hence added TensorFlow version magic. --- .../deep_learning_basics.ipynb | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/tutorial_deep_learning_basics/deep_learning_basics.ipynb b/tutorial_deep_learning_basics/deep_learning_basics.ipynb index 2b4f48f..81e5ecd 100644 --- a/tutorial_deep_learning_basics/deep_learning_basics.ipynb +++ b/tutorial_deep_learning_basics/deep_learning_basics.ipynb @@ -74,6 +74,28 @@ "Note that there's [tf.keras](https://www.tensorflow.org/guide/keras) (comes with TensorFlow) and there's [Keras](https://keras.io/) (standalone). You should be using [tf.keras](https://www.tensorflow.org/guide/keras) because (1) it comes with TensorFlow so you don't need to install anything extra and (2) it comes with powerful TensorFlow-specific features." ] }, + { + "cell_type": "code", + "metadata": { + "id": "", + "colab_type": "code", + "colab": {} + }, + "source": [ + "%tensorflow_version 1.x" + ], + "execution_count": 1, + "outputs": [ + { + "output_type": "stream", + "text": [ + "TensorFlow 1.x selected.\n" + ], + "name": "stdout" + } + ] + }, + { "cell_type": "code", "execution_count": 6, From 89dbccaf60e8dd58d692280aec2af128576cc5f7 Mon Sep 17 00:00:00 2001 From: Shaikh Ali Mustufa Date: Tue, 28 Jul 2020 13:15:36 +0530 Subject: [PATCH 2/4] fix for Colab Colab now supports TensorFlow2.x by default so the code breaks. hence added TensorFlow version magic. --- .../tutorial_driving_scene_segmentation.ipynb | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/tutorial_driving_scene_segmentation/tutorial_driving_scene_segmentation.ipynb b/tutorial_driving_scene_segmentation/tutorial_driving_scene_segmentation.ipynb index 8e38eff..3da6448 100644 --- a/tutorial_driving_scene_segmentation/tutorial_driving_scene_segmentation.ipynb +++ b/tutorial_driving_scene_segmentation/tutorial_driving_scene_segmentation.ipynb @@ -10,6 +10,27 @@ "![MIT Deep Learning](https://deeplearning.mit.edu/files/images/github/mit_deep_learning.png)" ] }, + { + "cell_type": "code", + "metadata": { + "id": "", + "colab_type": "code", + "colab": {} + }, + "source": [ + "%tensorflow_version 1.x" + ], + "execution_count": 1, + "outputs": [ + { + "output_type": "stream", + "text": [ + "TensorFlow 1.x selected.\n" + ], + "name": "stdout" + } + ] + }, { "cell_type": "markdown", "metadata": { From 22bd8168807bd952253c38ec5a2c2047d36f7bf9 Mon Sep 17 00:00:00 2001 From: Shaikh Ali Mustufa Date: Tue, 28 Jul 2020 13:17:08 +0530 Subject: [PATCH 3/4] fix for Colab Colab now supports TensorFlow2.x by default so the code breaks. hence added TensorFlow version magic. --- .../tutorial_driving_scene_segmentation.ipynb | 42 +++++++++---------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/tutorial_driving_scene_segmentation/tutorial_driving_scene_segmentation.ipynb b/tutorial_driving_scene_segmentation/tutorial_driving_scene_segmentation.ipynb index 3da6448..9893e49 100644 --- a/tutorial_driving_scene_segmentation/tutorial_driving_scene_segmentation.ipynb +++ b/tutorial_driving_scene_segmentation/tutorial_driving_scene_segmentation.ipynb @@ -10,27 +10,6 @@ "![MIT Deep Learning](https://deeplearning.mit.edu/files/images/github/mit_deep_learning.png)" ] }, - { - "cell_type": "code", - "metadata": { - "id": "", - "colab_type": "code", - "colab": {} - }, - "source": [ - "%tensorflow_version 1.x" - ], - "execution_count": 1, - "outputs": [ - { - "output_type": "stream", - "text": [ - "TensorFlow 1.x selected.\n" - ], - "name": "stdout" - } - ] - }, { "cell_type": "markdown", "metadata": { @@ -65,6 +44,27 @@ "This tutorial demostrates the steps to run DeepLab semantic scene segmentation model on a sample video from MIT Driving Scene Segmentation Dataset." ] }, + { + "cell_type": "code", + "metadata": { + "id": "", + "colab_type": "code", + "colab": {} + }, + "source": [ + "%tensorflow_version 1.x" + ], + "execution_count": 1, + "outputs": [ + { + "output_type": "stream", + "text": [ + "TensorFlow 1.x selected.\n" + ], + "name": "stdout" + } + ] + }, { "cell_type": "code", "execution_count": 1, From 603bfaa2b0ca1e6b100fcde2d703610007e49fcc Mon Sep 17 00:00:00 2001 From: Shaikh Ali Mustufa Date: Tue, 28 Jul 2020 13:20:20 +0530 Subject: [PATCH 4/4] fix for colab Colab now supports TensorFlow2.x by default so the code breaks. hence added TensorFlow version magic. --- tutorial_gans/tutorial_gans.ipynb | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/tutorial_gans/tutorial_gans.ipynb b/tutorial_gans/tutorial_gans.ipynb index 7abdceb..1d432e8 100644 --- a/tutorial_gans/tutorial_gans.ipynb +++ b/tutorial_gans/tutorial_gans.ipynb @@ -71,6 +71,27 @@ "We recommend that you run this this notebook in the cloud on Google Colab. If you have not done so yet, consider following the setup steps in the [Deep Learning Basics tutorial](https://github.com/lexfridman/mit-deep-learning) and reading the [Deep Learning Basics: Introduction and Overview with TensorFlow](https://medium.com/tensorflow/mit-deep-learning-basics-introduction-and-overview-with-tensorflow-355bcd26baf0) blog post." ] }, + { + "cell_type": "code", + "metadata": { + "id": "", + "colab_type": "code", + "colab": {} + }, + "source": [ + "%tensorflow_version 1.x" + ], + "execution_count": 1, + "outputs": [ + { + "output_type": "stream", + "text": [ + "TensorFlow 1.x selected.\n" + ], + "name": "stdout" + } + ] + }, { "cell_type": "code", "execution_count": 1,