Open prateekvyas1996 opened 4 years ago
I'm struggling with this problem. Could you please tell me how I can change my code using GradientTape?
I had the same problem. I implemented this answer and it solved the issue.
It suggests adding the following code before calling K.gradients
:
import tensorflow as tf
tf.compat.v1.disable_eager_execution()
There is a problem in code number 13 where K.gradients is used it should be modified with tf.GradientTape