【发布时间】:2020-02-10 11:43:52
【问题描述】:
大家好,我正在使用 Tensorflow 2.0
在这些代码行中:
import tensorflow as tf
hello = tf.constant('Hello World')
sess = tf.compat.v1.Session()
sess.run(hello) <-- Error in this line
RuntimeError:会话图为空。向图中添加操作 在调用 run() 之前。
你知道如何解决吗?
【问题讨论】:
标签: python tensorflow session tensorflow2.0