若报错可以使用
import tensorflow as tf
tf.compat.v1.disable_eager_execution()
来代替
import tensorflow as tf
并且后面的Placehoder函数用下面的tf来代替
X = tf.compat.v1.placeholder(tf.float32)
Y = tf.compat.v1.placeholder(tf.float32)
若报错可以使用
import tensorflow as tf
tf.compat.v1.disable_eager_execution()
来代替
import tensorflow as tf
并且后面的Placehoder函数用下面的tf来代替
X = tf.compat.v1.placeholder(tf.float32)
Y = tf.compat.v1.placeholder(tf.float32)