From 726d93a46600058a910cbcfda927b080aebd7913 Mon Sep 17 00:00:00 2001 From: kate Date: Mon, 18 Apr 2022 15:18:05 +0100 Subject: [PATCH] Update for Python3 compatibility --- notebooks/tutorial.ipynb | 610 ++++++++++++++++++++++----------------- 1 file changed, 348 insertions(+), 262 deletions(-) diff --git a/notebooks/tutorial.ipynb b/notebooks/tutorial.ipynb index 9f754760..6fce2a6f 100644 --- a/notebooks/tutorial.ipynb +++ b/notebooks/tutorial.ipynb @@ -4,22 +4,21 @@ "metadata": { "colab": { "name": "Lucid Tutorial", - "version": "0.3.2", - "views": {}, - "default_view": {}, "provenance": [] }, "kernelspec": { - "name": "python2", - "display_name": "Python 2" + "name": "python3", + "display_name": "Python 3" }, - "accelerator": "GPU" + "accelerator": "GPU", + "language_info": { + "name": "python" + } }, "cells": [ { "metadata": { - "id": "JndnmDMp66FL", - "colab_type": "text" + "id": "JndnmDMp66FL" }, "cell_type": "markdown", "source": [ @@ -31,13 +30,6 @@ { "metadata": { "id": "hMqWDc_m6rUC", - "colab_type": "code", - "colab": { - "autoexec": { - "startup": false, - "wait_interval": 0 - } - }, "cellView": "both" }, "cell_type": "code", @@ -54,13 +46,12 @@ "# See the License for the specific language governing permissions and\n", "# limitations under the License." ], - "execution_count": 0, + "execution_count": null, "outputs": [] }, { "metadata": { - "id": "_vAVmphMywZR", - "colab_type": "text" + "id": "_vAVmphMywZR" }, "cell_type": "markdown", "source": [ @@ -80,8 +71,7 @@ }, { "metadata": { - "id": "FsFc1mE51tCd", - "colab_type": "text" + "id": "FsFc1mE51tCd" }, "cell_type": "markdown", "source": [ @@ -91,41 +81,40 @@ { "metadata": { "id": "tavMPe3KQ8Cs", - "colab_type": "code", "colab": { - "autoexec": { - "startup": false, - "wait_interval": 0 - } - } + "base_uri": "https://localhost:8080/" + }, + "outputId": "0b8c356d-5209-4285-d34c-42dd91374d6a" }, "cell_type": "code", "source": [ "# Install Lucid\n", "\n", + "!pip install numpy==1.19.5\n", "!pip install --quiet lucid==0.2.3\n", "#!pip install --quiet --upgrade-strategy=only-if-needed git+https://github.com/tensorflow/lucid.git\n", "# %tensorflow_version only works on colab\n", "%tensorflow_version 1.x\n" ], - "execution_count": 0, - "outputs": [] + "execution_count": 1, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "Requirement already satisfied: numpy==1.19.5 in /usr/local/lib/python3.7/dist-packages (1.19.5)\n", + "TensorFlow 1.x selected.\n" + ] + } + ] }, { "metadata": { - "id": "RBr8QbboRAdU", - "colab_type": "code", - "colab": { - "autoexec": { - "startup": false, - "wait_interval": 0 - } - } + "id": "RBr8QbboRAdU" }, "cell_type": "code", "source": [ "# Imports\n", - "\n", "import numpy as np\n", "import tensorflow as tf\n", "assert tf.__version__.startswith('1')\n", @@ -137,19 +126,12 @@ "import lucid.optvis.render as render\n", "import lucid.optvis.transform as transform" ], - "execution_count": 0, + "execution_count": 2, "outputs": [] }, { "metadata": { - "id": "yNALaA0QRJVT", - "colab_type": "code", - "colab": { - "autoexec": { - "startup": false, - "wait_interval": 0 - } - } + "id": "yNALaA0QRJVT" }, "cell_type": "code", "source": [ @@ -158,13 +140,12 @@ "model = models.InceptionV1()\n", "model.load_graphdef()" ], - "execution_count": 0, + "execution_count": 4, "outputs": [] }, { "metadata": { - "id": "1l31v18X42gc", - "colab_type": "text" + "id": "1l31v18X42gc" }, "cell_type": "markdown", "source": [ @@ -177,8 +158,7 @@ }, { "metadata": { - "id": "VcUL29K612SI", - "colab_type": "text" + "id": "VcUL29K612SI" }, "cell_type": "markdown", "source": [ @@ -188,27 +168,11 @@ { "metadata": { "id": "CLDYzkKoRQtw", - "colab_type": "code", "colab": { - "autoexec": { - "startup": false, - "wait_interval": 0 - }, "base_uri": "https://localhost:8080/", - "height": 166 + "height": 1000 }, - "outputId": "47739b06-c868-4627-924c-dc28ada359d2", - "executionInfo": { - "status": "ok", - "timestamp": 1520528085592, - "user_tz": 480, - "elapsed": 9883, - "user": { - "displayName": "", - "photoUrl": "", - "userId": "" - } - } + "outputId": "ff8c6b2f-c154-481a-a14a-e81139e6a253" }, "cell_type": "code", "source": [ @@ -216,14 +180,268 @@ "\n", "_ = render.render_vis(model, \"mixed4a_pre_relu:476\")" ], - "execution_count": 0, + "execution_count": 5, "outputs": [ { "output_type": "stream", + "name": "stdout", + "text": [ + "WARNING:tensorflow:From /tensorflow-1.15.2/python3.7/lucid/optvis/render.py:89: The name tf.Session is deprecated. Please use tf.compat.v1.Session instead.\n", + "\n" + ] + }, + { + "output_type": "stream", + "name": "stderr", + "text": [ + "WARNING:tensorflow:From /tensorflow-1.15.2/python3.7/lucid/optvis/render.py:89: The name tf.Session is deprecated. Please use tf.compat.v1.Session instead.\n", + "\n" + ] + }, + { + "output_type": "stream", + "name": "stdout", + "text": [ + "WARNING:tensorflow:From /tensorflow-1.15.2/python3.7/lucid/optvis/render.py:224: The name tf.get_default_graph is deprecated. Please use tf.compat.v1.get_default_graph instead.\n", + "\n" + ] + }, + { + "output_type": "stream", + "name": "stderr", + "text": [ + "WARNING:tensorflow:From /tensorflow-1.15.2/python3.7/lucid/optvis/render.py:224: The name tf.get_default_graph is deprecated. Please use tf.compat.v1.get_default_graph instead.\n", + "\n" + ] + }, + { + "output_type": "stream", + "name": "stdout", + "text": [ + "WARNING:tensorflow:From /tensorflow-1.15.2/python3.7/lucid/optvis/render.py:242: The name tf.train.AdamOptimizer is deprecated. Please use tf.compat.v1.train.AdamOptimizer instead.\n", + "\n" + ] + }, + { + "output_type": "stream", + "name": "stderr", + "text": [ + "WARNING:tensorflow:From /tensorflow-1.15.2/python3.7/lucid/optvis/render.py:242: The name tf.train.AdamOptimizer is deprecated. Please use tf.compat.v1.train.AdamOptimizer instead.\n", + "\n" + ] + }, + { + "output_type": "stream", + "name": "stdout", + "text": [ + "WARNING:tensorflow:From /tensorflow-1.15.2/python3.7/lucid/optvis/render.py:170: The name tf.train.get_or_create_global_step is deprecated. Please use tf.compat.v1.train.get_or_create_global_step instead.\n", + "\n" + ] + }, + { + "output_type": "stream", + "name": "stderr", + "text": [ + "WARNING:tensorflow:From /tensorflow-1.15.2/python3.7/lucid/optvis/render.py:170: The name tf.train.get_or_create_global_step is deprecated. Please use tf.compat.v1.train.get_or_create_global_step instead.\n", + "\n" + ] + }, + { + "output_type": "stream", + "name": "stdout", + "text": [ + "WARNING:tensorflow:From /tensorflow-1.15.2/python3.7/lucid/optvis/render.py:171: The name tf.variables_initializer is deprecated. Please use tf.compat.v1.variables_initializer instead.\n", + "\n" + ] + }, + { + "output_type": "stream", + "name": "stderr", + "text": [ + "WARNING:tensorflow:From /tensorflow-1.15.2/python3.7/lucid/optvis/render.py:171: The name tf.variables_initializer is deprecated. Please use tf.compat.v1.variables_initializer instead.\n", + "\n" + ] + }, + { + "output_type": "stream", + "name": "stdout", + "text": [ + "WARNING:tensorflow:From /tensorflow-1.15.2/python3.7/lucid/optvis/transform.py:38: The name tf.random_crop is deprecated. Please use tf.image.random_crop instead.\n", + "\n" + ] + }, + { + "output_type": "stream", + "name": "stderr", + "text": [ + "WARNING:tensorflow:From /tensorflow-1.15.2/python3.7/lucid/optvis/transform.py:38: The name tf.random_crop is deprecated. Please use tf.image.random_crop instead.\n", + "\n" + ] + }, + { + "output_type": "stream", + "name": "stdout", + "text": [ + "WARNING:tensorflow:From /tensorflow-1.15.2/python3.7/lucid/optvis/transform.py:141: The name tf.random_uniform is deprecated. Please use tf.random.uniform instead.\n", + "\n" + ] + }, + { + "output_type": "stream", + "name": "stderr", + "text": [ + "WARNING:tensorflow:From /tensorflow-1.15.2/python3.7/lucid/optvis/transform.py:141: The name tf.random_uniform is deprecated. Please use tf.random.uniform instead.\n", + "\n" + ] + }, + { + "output_type": "stream", + "name": "stdout", + "text": [ + "WARNING:tensorflow:From /tensorflow-1.15.2/python3.7/lucid/optvis/transform.py:83: The name tf.image.resize_bilinear is deprecated. Please use tf.compat.v1.image.resize_bilinear instead.\n", + "\n" + ] + }, + { + "output_type": "stream", + "name": "stderr", + "text": [ + "WARNING:tensorflow:From /tensorflow-1.15.2/python3.7/lucid/optvis/transform.py:83: The name tf.image.resize_bilinear is deprecated. Please use tf.compat.v1.image.resize_bilinear instead.\n", + "\n" + ] + }, + { + "output_type": "stream", + "name": "stdout", + "text": [ + "WARNING:tensorflow:\n", + "The TensorFlow contrib module will not be included in TensorFlow 2.0.\n", + "For more information, please see:\n", + " * https://github.com/tensorflow/community/blob/master/rfcs/20180907-contrib-sunset.md\n", + " * https://github.com/tensorflow/addons\n", + " * https://github.com/tensorflow/io (for I/O related ops)\n", + "If you depend on functionality not listed there, please file an issue.\n", + "\n" + ] + }, + { + "output_type": "stream", + "name": "stderr", + "text": [ + "WARNING:tensorflow:\n", + "The TensorFlow contrib module will not be included in TensorFlow 2.0.\n", + "For more information, please see:\n", + " * https://github.com/tensorflow/community/blob/master/rfcs/20180907-contrib-sunset.md\n", + " * https://github.com/tensorflow/addons\n", + " * https://github.com/tensorflow/io (for I/O related ops)\n", + "If you depend on functionality not listed there, please file an issue.\n", + "\n" + ] + }, + { + "output_type": "stream", + "name": "stdout", + "text": [ + "WARNING:tensorflow:From /tensorflow-1.15.2/python3.7/lucid/modelzoo/util.py:58: The name tf.placeholder_with_default is deprecated. Please use tf.compat.v1.placeholder_with_default instead.\n", + "\n" + ] + }, + { + "output_type": "stream", + "name": "stderr", + "text": [ + "WARNING:tensorflow:From /tensorflow-1.15.2/python3.7/lucid/modelzoo/util.py:58: The name tf.placeholder_with_default is deprecated. Please use tf.compat.v1.placeholder_with_default instead.\n", + "\n" + ] + }, + { + "output_type": "stream", + "name": "stdout", + "text": [ + "WARNING:tensorflow:From /tensorflow-1.15.2/python3.7/lucid/misc/io/writing.py:69: The name tf.gfile.MakeDirs is deprecated. Please use tf.io.gfile.makedirs instead.\n", + "\n" + ] + }, + { + "output_type": "stream", + "name": "stderr", + "text": [ + "WARNING:tensorflow:From /tensorflow-1.15.2/python3.7/lucid/misc/io/writing.py:69: The name tf.gfile.MakeDirs is deprecated. Please use tf.io.gfile.makedirs instead.\n", + "\n" + ] + }, + { + "output_type": "stream", + "name": "stdout", + "text": [ + "WARNING:tensorflow:From /tensorflow-1.15.2/python3.7/lucid/misc/io/writing.py:77: The name tf.gfile.Open is deprecated. Please use tf.io.gfile.GFile instead.\n", + "\n" + ] + }, + { + "output_type": "stream", + "name": "stderr", + "text": [ + "WARNING:tensorflow:From /tensorflow-1.15.2/python3.7/lucid/misc/io/writing.py:77: The name tf.gfile.Open is deprecated. Please use tf.io.gfile.GFile instead.\n", + "\n" + ] + }, + { + "output_type": "stream", + "name": "stdout", "text": [ - "512 1150.7921\n" - ], - "name": "stdout" + "WARNING:tensorflow:From /tensorflow-1.15.2/python3.7/lucid/misc/io/loading.py:129: The name tf.GraphDef is deprecated. Please use tf.compat.v1.GraphDef instead.\n", + "\n" + ] + }, + { + "output_type": "stream", + "name": "stderr", + "text": [ + "WARNING:tensorflow:From /tensorflow-1.15.2/python3.7/lucid/misc/io/loading.py:129: The name tf.GraphDef is deprecated. Please use tf.compat.v1.GraphDef instead.\n", + "\n" + ] + }, + { + "output_type": "stream", + "name": "stdout", + "text": [ + "WARNING:tensorflow:From /tensorflow-1.15.2/python3.7/lucid/misc/redirected_relu_grad.py:95: where (from tensorflow.python.ops.array_ops) is deprecated and will be removed in a future version.\n", + "Instructions for updating:\n", + "Use tf.where in 2.0, which has the same broadcast rule as np.where\n" + ] + }, + { + "output_type": "stream", + "name": "stderr", + "text": [ + "WARNING:tensorflow:From /tensorflow-1.15.2/python3.7/lucid/misc/redirected_relu_grad.py:95: where (from tensorflow.python.ops.array_ops) is deprecated and will be removed in a future version.\n", + "Instructions for updating:\n", + "Use tf.where in 2.0, which has the same broadcast rule as np.where\n" + ] + }, + { + "output_type": "stream", + "name": "stdout", + "text": [ + "WARNING:tensorflow:From /tensorflow-1.15.2/python3.7/lucid/optvis/render.py:98: The name tf.global_variables_initializer is deprecated. Please use tf.compat.v1.global_variables_initializer instead.\n", + "\n" + ] + }, + { + "output_type": "stream", + "name": "stderr", + "text": [ + "WARNING:tensorflow:From /tensorflow-1.15.2/python3.7/lucid/optvis/render.py:98: The name tf.global_variables_initializer is deprecated. Please use tf.compat.v1.global_variables_initializer instead.\n", + "\n" + ] + }, + { + "output_type": "stream", + "name": "stdout", + "text": [ + "512 1152.2368\n" + ] }, { "output_type": "display_data", @@ -232,19 +450,16 @@ "" ], "text/html": [ - "" + "" ] }, - "metadata": { - "tags": [] - } + "metadata": {} } ] }, { "metadata": { - "id": "6gmaVSej19us", - "colab_type": "text" + "id": "6gmaVSej19us" }, "cell_type": "markdown", "source": [ @@ -261,8 +476,7 @@ }, { "metadata": { - "id": "6zO3np2D2tGh", - "colab_type": "text" + "id": "6zO3np2D2tGh" }, "cell_type": "markdown", "source": [ @@ -272,27 +486,11 @@ { "metadata": { "id": "YyexdOXIcH2i", - "colab_type": "code", "colab": { - "autoexec": { - "startup": false, - "wait_interval": 0 - }, "base_uri": "https://localhost:8080/", "height": 166 }, - "outputId": "79641344-277d-4c33-993b-da8930e569c7", - "executionInfo": { - "status": "ok", - "timestamp": 1518144808685, - "user_tz": 480, - "elapsed": 102011, - "user": { - "displayName": "Christopher Olah", - "photoUrl": "//lh6.googleusercontent.com/-BDHAgNAk34E/AAAAAAAAAAI/AAAAAAAAAMw/gTWZ3IeP8dY/s50-c-k-no/photo.jpg", - "userId": "104989755527098071788" - } - } + "outputId": "a05bff0c-fc9c-4994-f947-3bb34936c38a" }, "cell_type": "code", "source": [ @@ -301,14 +499,14 @@ "obj = objectives.channel(\"mixed4a_pre_relu\", 465)\n", "_ = render.render_vis(model, obj)" ], - "execution_count": 0, + "execution_count": 6, "outputs": [ { "output_type": "stream", + "name": "stdout", "text": [ - "512 1785.2615\n" - ], - "name": "stdout" + "512 1754.0537\n" + ] }, { "output_type": "display_data", @@ -317,39 +515,21 @@ "" ], "text/html": [ - "" + "" ] }, - "metadata": { - "tags": [] - } + "metadata": {} } ] }, { "metadata": { "id": "YdERJ3_7cLdy", - "colab_type": "code", "colab": { - "autoexec": { - "startup": false, - "wait_interval": 0 - }, "base_uri": "https://localhost:8080/", "height": 166 }, - "outputId": "8201d3be-9487-4ca7-819f-b332b459ab6f", - "executionInfo": { - "status": "ok", - "timestamp": 1518144939030, - "user_tz": 480, - "elapsed": 101841, - "user": { - "displayName": "Christopher Olah", - "photoUrl": "//lh6.googleusercontent.com/-BDHAgNAk34E/AAAAAAAAAAI/AAAAAAAAAMw/gTWZ3IeP8dY/s50-c-k-no/photo.jpg", - "userId": "104989755527098071788" - } - } + "outputId": "6472ffe4-1e63-4967-c34e-e7a2f6d3441b" }, "cell_type": "code", "source": [ @@ -360,14 +540,14 @@ "obj = channel(476) + channel(465)\n", "_ = render.render_vis(model, obj)" ], - "execution_count": 0, + "execution_count": 7, "outputs": [ { "output_type": "stream", + "name": "stdout", "text": [ - "512 2312.0425\n" - ], - "name": "stdout" + "512 1880.8986\n" + ] }, { "output_type": "display_data", @@ -376,19 +556,16 @@ "" ], "text/html": [ - "" + "" ] }, - "metadata": { - "tags": [] - } + "metadata": {} } ] }, { "metadata": { - "id": "9Rvhpqtn3XXm", - "colab_type": "text" + "id": "9Rvhpqtn3XXm" }, "cell_type": "markdown", "source": [ @@ -400,27 +577,11 @@ { "metadata": { "id": "DDBH4gpD3X2O", - "colab_type": "code", "colab": { - "autoexec": { - "startup": false, - "wait_interval": 0 - }, "base_uri": "https://localhost:8080/", "height": 166 }, - "outputId": "4eb10b16-79e6-4b86-daa8-8e52d258fe69", - "executionInfo": { - "status": "ok", - "timestamp": 1518145016924, - "user_tz": 480, - "elapsed": 77826, - "user": { - "displayName": "Christopher Olah", - "photoUrl": "//lh6.googleusercontent.com/-BDHAgNAk34E/AAAAAAAAAAI/AAAAAAAAAMw/gTWZ3IeP8dY/s50-c-k-no/photo.jpg", - "userId": "104989755527098071788" - } - } + "outputId": "f7d47583-7ffb-43f7-9b28-27b7f5d303cf" }, "cell_type": "code", "source": [ @@ -429,14 +590,14 @@ "transforms = []\n", "_ = render.render_vis(model, \"mixed4a_pre_relu:476\", transforms=transforms)" ], - "execution_count": 0, + "execution_count": 8, "outputs": [ { "output_type": "stream", + "name": "stdout", "text": [ - "512 2420.1245\n" - ], - "name": "stdout" + "512 2347.4062\n" + ] }, { "output_type": "display_data", @@ -445,39 +606,21 @@ "" ], "text/html": [ - "" + "" ] }, - "metadata": { - "tags": [] - } + "metadata": {} } ] }, { "metadata": { "id": "mDOviz8d4n4c", - "colab_type": "code", "colab": { - "autoexec": { - "startup": false, - "wait_interval": 0 - }, "base_uri": "https://localhost:8080/", "height": 166 }, - "outputId": "89be067a-b356-443d-d589-ab55016190a1", - "executionInfo": { - "status": "ok", - "timestamp": 1518145095337, - "user_tz": 480, - "elapsed": 78302, - "user": { - "displayName": "Christopher Olah", - "photoUrl": "//lh6.googleusercontent.com/-BDHAgNAk34E/AAAAAAAAAAI/AAAAAAAAAMw/gTWZ3IeP8dY/s50-c-k-no/photo.jpg", - "userId": "104989755527098071788" - } - } + "outputId": "080c71d5-d967-474d-ab93-5d4efbbc7529" }, "cell_type": "code", "source": [ @@ -488,14 +631,14 @@ "]\n", "_ = render.render_vis(model, \"mixed4a_pre_relu:476\", transforms=transforms)" ], - "execution_count": 0, + "execution_count": 9, "outputs": [ { "output_type": "stream", + "name": "stdout", "text": [ - "512 1853.4551\n" - ], - "name": "stdout" + "512 1833.1138\n" + ] }, { "output_type": "display_data", @@ -504,39 +647,21 @@ "" ], "text/html": [ - "" + "" ] }, - "metadata": { - "tags": [] - } + "metadata": {} } ] }, { "metadata": { "id": "325tbTiE5GpJ", - "colab_type": "code", "colab": { - "autoexec": { - "startup": false, - "wait_interval": 0 - }, "base_uri": "https://localhost:8080/", "height": 166 }, - "outputId": "780d820d-643d-4e99-ff26-ca7b0ebf2453", - "executionInfo": { - "status": "ok", - "timestamp": 1518145209289, - "user_tz": 480, - "elapsed": 113882, - "user": { - "displayName": "Christopher Olah", - "photoUrl": "//lh6.googleusercontent.com/-BDHAgNAk34E/AAAAAAAAAAI/AAAAAAAAAMw/gTWZ3IeP8dY/s50-c-k-no/photo.jpg", - "userId": "104989755527098071788" - } - } + "outputId": "6869d685-22bc-42af-f36e-f4616ae141d5" }, "cell_type": "code", "source": [ @@ -546,19 +671,19 @@ " transform.pad(16),\n", " transform.jitter(8),\n", " transform.random_scale([n/100. for n in range(80, 120)]),\n", - " transform.random_rotate(range(-10,10) + range(-5,5) + 10*range(-2,2)),\n", + " transform.random_rotate(list(range(-10,10)) + list(range(-5,5)) + 10*list(range(-2,2))),\n", " transform.jitter(2)\n", "]\n", "_ = render.render_vis(model, \"mixed4a_pre_relu:476\", transforms=transforms)" ], - "execution_count": 0, + "execution_count": 11, "outputs": [ { "output_type": "stream", + "name": "stdout", "text": [ - "512 1195.9929\n" - ], - "name": "stdout" + "512 1238.9158\n" + ] }, { "output_type": "display_data", @@ -567,19 +692,16 @@ "" ], "text/html": [ - "" + "" ] }, - "metadata": { - "tags": [] - } + "metadata": {} } ] }, { "metadata": { - "id": "lW2Fmtv124Bo", - "colab_type": "text" + "id": "lW2Fmtv124Bo" }, "cell_type": "markdown", "source": [ @@ -591,27 +713,11 @@ { "metadata": { "id": "N-BTF_W0fHZh", - "colab_type": "code", "colab": { - "autoexec": { - "startup": false, - "wait_interval": 0 - }, "base_uri": "https://localhost:8080/", "height": 166 }, - "outputId": "e3c92004-c89e-4c7b-da4f-21d364f30906", - "executionInfo": { - "status": "ok", - "timestamp": 1518145357388, - "user_tz": 480, - "elapsed": 91118, - "user": { - "displayName": "Christopher Olah", - "photoUrl": "//lh6.googleusercontent.com/-BDHAgNAk34E/AAAAAAAAAAI/AAAAAAAAAMw/gTWZ3IeP8dY/s50-c-k-no/photo.jpg", - "userId": "104989755527098071788" - } - } + "outputId": "fe37dd85-acc6-43ed-a717-9babb70ad2db" }, "cell_type": "code", "source": [ @@ -621,14 +727,14 @@ "param_f = lambda: param.image(128, fft=False, decorrelate=False)\n", "_ = render.render_vis(model, \"mixed4a_pre_relu:2\", param_f)" ], - "execution_count": 0, + "execution_count": 10, "outputs": [ { "output_type": "stream", + "name": "stdout", "text": [ - "512 808.84076\n" - ], - "name": "stdout" + "512 1001.67456\n" + ] }, { "output_type": "display_data", @@ -637,39 +743,21 @@ "" ], "text/html": [ - "" + "" ] }, - "metadata": { - "tags": [] - } + "metadata": {} } ] }, { "metadata": { "id": "8hrCwdxhcUHn", - "colab_type": "code", "colab": { - "autoexec": { - "startup": false, - "wait_interval": 0 - }, "base_uri": "https://localhost:8080/", "height": 166 }, - "outputId": "9e0fd16a-55b2-43e3-fcd8-c29164d35fcc", - "executionInfo": { - "status": "ok", - "timestamp": 1517984295016, - "user_tz": 480, - "elapsed": 6988, - "user": { - "displayName": "Christopher Olah", - "photoUrl": "//lh6.googleusercontent.com/-BDHAgNAk34E/AAAAAAAAAAI/AAAAAAAAAMw/gTWZ3IeP8dY/s50-c-k-no/photo.jpg", - "userId": "104989755527098071788" - } - } + "outputId": "23154f69-e885-4631-c5cf-328eb2ab8e47" }, "cell_type": "code", "source": [ @@ -679,14 +767,14 @@ "param_f = lambda: param.image(128, fft=True, decorrelate=True)\n", "_ = render.render_vis(model, \"mixed4a_pre_relu:2\", param_f)" ], - "execution_count": 0, + "execution_count": 11, "outputs": [ { "output_type": "stream", + "name": "stdout", "text": [ - "512 1191.0022\n" - ], - "name": "stdout" + "512 1022.6305\n" + ] }, { "output_type": "display_data", @@ -695,14 +783,12 @@ "" ], "text/html": [ - "" + "" ] }, - "metadata": { - "tags": [] - } + "metadata": {} } ] } ] -} +} \ No newline at end of file