我已经在 Ubuntu 16.10 环境中从 Source 安装了 tensorflow。一切顺利,但现在在编译程序时,它显示以下错误:
Traceback (most recent call last):
File "ff.py", line 3, in <module>
sess = tf.InteractiveSession()
AttributeError: module 'tensorflow' has no attribute 'InteractiveSession'
没有找到与此相关的帖子。有人可以帮忙吗?
原文由 Saurav– 发布,翻译遵循 CC BY-SA 4.0 许可协议
如果您使用的是 tesorflow 2.0.0 版本,请使用上面的行而不是
sess = tf.InteractiveSession()
行