原因:
tensorflow版本不同导致的,部分高版本不兼容低版本
解决办法:
在sess.run前(尽量在tensorflow调用的第一个方法之前,因为不止这个函数会报错)加上tf.compat.v1.disable_eager_execution()
RuntimeError: The Session graph is empty. Add operations to the graph before calling run()
最新推荐文章于 2023-04-10 20:07:30 发布