Skip to content

Commit 4ae8de3

Browse files
Update adversarial_keras_cnn_mnist.ipynb
Updated 'tf.keras.preprocessing.image.array_to_img' to 'tf.keras.utils.array_to_img' in 'Examples of adversarially-perturbed images' section and ran the code successfully after changes.
1 parent dbbe59b commit 4ae8de3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

g3doc/tutorials/adversarial_keras_cnn_mnist.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -754,7 +754,7 @@
754754
" y_adv = batch_pred['adv-regularized'][i]\n",
755755
" plt.subplot(n_row, n_col, i+1)\n",
756756
" plt.title('true: %d, base: %d, adv: %d' % (y, y_base, y_adv))\n",
757-
" plt.imshow(tf.keras.preprocessing.image.array_to_img(image), cmap='gray')\n",
757+
" plt.imshow(tf.keras.utils.array_to_img(image), cmap='gray')\n",
758758
" plt.axis('off')\n",
759759
"\n",
760760
"plt.show()"

0 commit comments

Comments
 (0)