Commit 9317f3b4 authored by Tyler's avatar Tyler Committed by Hongkun Yu
Browse files

Fixed tfe.Variable error (#7674)

After Eager was moved to core Tensorflow, this notebook gives the error:
AttributeError: module 'tensorflow.contrib.eager' has no attribute 'Variable'
I just fixed it.
parent 306e3e14
......@@ -169,7 +169,6 @@
"cell_type": "code",
"source": [
"import tensorflow as tf\n",
"import tensorflow.contrib.eager as tfe\n",
"\n",
"from tensorflow.python.keras.preprocessing import image as kp_image\n",
"from tensorflow.python.keras import models \n",
......@@ -826,7 +825,7 @@
" \n",
" # Set initial image\n",
" init_image = load_and_process_img(content_path)\n",
" init_image = tfe.Variable(init_image, dtype=tf.float32)\n",
" init_image = tf.Variable(init_image, dtype=tf.float32)\n",
" # Create our optimizer\n",
" opt = tf.train.AdamOptimizer(learning_rate=5, beta1=0.99, epsilon=1e-1)\n",
"\n",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment