- 博客(2)
- 资源 (4)
- 收藏
- 关注
转载 tensorflow2 AttributeError: module ‘tensorflow‘ has no attribute ‘Session‘
转载链接:https://blog.csdn.net/qq_40575024/article/details/105862550 收起 出现问题: AttributeError: module ‘tensorflow’ has no attribute ‘Session’ 原因: tensorflow2删除了 tf.Session() 解决方法: tf.Session() 将改为tf.compat.v1.Session() 或者版本降级:pip install tensorflow==1.4
2020-12-14 16:58:59 177
转载 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() import tensorflow as tf tf.compat.v1.disable_eager_execution() #保证sess.run()能够正常运行 hello = tf.constant('hello,tensorflow') sess= tf.compat.
2020-12-14 16:57:17 1649
Mastercam X基础教程PPT
2010-10-24
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人