I can’t seem to get my train step function to pass and not clear of the issue.
Currently I have:
# UNQ_C5
# GRADED FUNCTION: train_step
optimizer = tf.keras.optimizers.Adam(learning_rate=0.01)
@tf.function()
def train_step(generated_image):
with tf.GradientTape() as tape:
# In this function you must use the precomputed encoded images a_S and a_C
### START CODE HERE
{moderator edit: solution code removed}
### END CODE HERE
grad = tape.gradient(J, generated_image)
optimizer.apply_gradients([(grad, generated_image)])
generated_image.assign(clip_0_1(generated_image))
# For grading purposes
return J
I get a ValueError: not enough values to unpack (expected 4, got 3)
It feels like my line with compute content cost may be wrong, but I can’t see the error.