Skip to content

Commit 70a4173

Browse files
Merge pull request #1981 from RenuPatelGoogle:patch-6
PiperOrigin-RevId: 414556040
2 parents e31bdb2 + 90d8dee commit 70a4173

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

site/en/tutorials/generative/deepdream.ipynb

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,7 @@
103103
"import matplotlib as mpl\n",
104104
"\n",
105105
"import IPython.display as display\n",
106-
"import PIL.Image\n",
107-
"\n",
108-
"from tensorflow.keras.preprocessing import image"
106+
"import PIL.Image"
109107
]
110108
},
111109
{
@@ -585,7 +583,7 @@
585583
"def run_deep_dream_with_octaves(img, steps_per_octave=100, step_size=0.01, \n",
586584
" octaves=range(-2,3), octave_scale=1.3):\n",
587585
" base_shape = tf.shape(img)\n",
588-
" img = tf.keras.preprocessing.image.img_to_array(img)\n",
586+
" img = tf.keras.utils.img_to_array(img)\n",
589587
" img = tf.keras.applications.inception_v3.preprocess_input(img)\n",
590588
"\n",
591589
" initial_shape = img.shape[:-1]\n",

0 commit comments

Comments
 (0)