RuntimeError: The Session graph is empty. Add operations to the graph before calling run().解决方法

问题产生的缘由:没法执行sess.run()的缘由是tensorflow版本不一样致使的,tensorflow版本2.0没法兼容版本1.0. 解决办法: tf.compat.v1.disable_eager_execution()web import tensorflow as tf tf.compat.v1.disable_eager_execution() #保证sess.run()可以正常运
相关文章
相关标签/搜索