If an error is reported, it can be used
import tensorflow as tf
tf.compat.v1.disable_eager_execution()
To replace
import tensorflow as tf
And the following placehoder function is replaced by the following TF
X = tf.compat.v1.placeholder(tf.float32)
Y = tf.compat.v1.placeholder(tf.float32)