📌  相关文章
📜  AttributeError: 模块 'tensorflow' 没有属性 'Session' site:stackoverflow.com - Python 代码示例

📅  最后修改于: 2022-03-11 14:46:19.048000             🧑  作者: Mango

代码示例3
import tensorflow as tf

tf.compat.v1.disable_eager_execution()

hello = tf.constant('Hello, TensorFlow!')

sess = tf.compat.v1.Session()

print(sess.run(hello))