tf2和tf1的版本问题
RuntimeError: tf.placeholder() is not compatible with eager execution.
加上代码后
import tensorflow.compat.v1 as tf
继续报错
Attempting to capture an EagerTensor without building a function
再添加代码
tf.disable_v2_behavior()
问题解决
tf2和tf1的版本问题
RuntimeError: tf.placeholder() is not compatible with eager execution.
加上代码后
import tensorflow.compat.v1 as tf
继续报错
Attempting to capture an EagerTensor without building a function
再添加代码
tf.disable_v2_behavior()
问题解决