Enudeme Jonathan
Enudeme Jonathan

Reputation: 1

Setting up gradient-descent process

I am trying to set up gradient-descent process with Keras, I keep getting error:

from keras import backend as K 

grads = K.gradients(loss, combination_image)[0]
fetch_loss_and_grads = K.function([combination_image], [loss, grads])

This is my error message:

tf.gradients is not supported when eager execution is enabled. Use tf.GradientTape instead.

Upvotes: 0

Views: 36

Answers (0)

Related Questions