Skip to content

Commit 68b2dc9

Browse files
Update deepdream.ipynb
Removed "from tensorflow.keras.preprocessing import image" . Also updated "tf.keras.preprocessing.image.img_to_array" to "tf.keras.utils.img_to_array".
1 parent 07ccab6 commit 68b2dc9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

site/en/tutorials/generative/deepdream.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@
105105
"import IPython.display as display\n",
106106
"import PIL.Image\n",
107107
"\n",
108-
"from tensorflow.keras.preprocessing import image"
108+
109109
]
110110
},
111111
{
@@ -585,7 +585,7 @@
585585
"def run_deep_dream_with_octaves(img, steps_per_octave=100, step_size=0.01, \n",
586586
" octaves=range(-2,3), octave_scale=1.3):\n",
587587
" base_shape = tf.shape(img)\n",
588-
" img = tf.keras.preprocessing.image.img_to_array(img)\n",
588+
" img = tf.keras.utils.img_to_array(img)\n",
589589
" img = tf.keras.applications.inception_v3.preprocess_input(img)\n",
590590
"\n",
591591
" initial_shape = img.shape[:-1]\n",

0 commit comments

Comments
 (0)