Skip to content

Commit e68c946

Browse files
chenmoneygithubcopybara-github
authored andcommitted
Use legacy optimizer because the optimizer is applied on two models.
PiperOrigin-RevId: 476931964
1 parent 4563dcc commit e68c946

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

site/en/tutorials/generative/style_transfer.ipynb

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,13 @@
8989
"This is implemented by optimizing the output image to match the content statistics of the content image and the style statistics of the style reference image. These statistics are extracted from the images using a convolutional network."
9090
]
9191
},
92+
{
93+
"cell_type": "markdown",
94+
"metadata": {
95+
"id": "28W8ggyO1KER"
96+
},
97+
"source": []
98+
},
9299
{
93100
"cell_type": "markdown",
94101
"metadata": {
@@ -1029,7 +1036,7 @@
10291036
"id": "lcLWBQChsutQ"
10301037
},
10311038
"source": [
1032-
"Reinitialize the optimization variable:"
1039+
"Reinitialize the image-variable and the optimizer:"
10331040
]
10341041
},
10351042
{
@@ -1040,6 +1047,7 @@
10401047
},
10411048
"outputs": [],
10421049
"source": [
1050+
"opt = tf.keras.optimizers.Adam(learning_rate=0.02, beta_1=0.99, epsilon=1e-1)\n",
10431051
"image = tf.Variable(content_image)"
10441052
]
10451053
},

0 commit comments

Comments
 (0)