RuntimeError: tf.gradients is not supported when eager execution is enabled. Use tf.GradientTape instead.
导包时加入以下代码:
import tensorflow as tf tf.compat.v1.disable_eager_execution()
欢迎关注我的CSDN博客心系五道口,有问题请私信2395856915@qq.com
导包时加入以下代码:
import tensorflow as tf tf.compat.v1.disable_eager_execution()