tensorflow 2.x 入门 # tensorflow 2.x 入门 import tensorflow as tf tf.compat.v1.disable_eager_execution() hello = tf.constant('Hello,TensorFlow') sess = tf.compat.v1.Session() print((sess.run(hello).decode()))