【发布时间】:2020-12-16 16:07:59
【问题描述】:
我在 Jupyter 中运行 tf.InteractiveSession() 时遇到问题,我不知道如何修改它。我是初学者,希望得到一些指导!
在此处输入此代码:
import tensorflow as tf
sess = tf.InteractiveSession()
x = tf.constant([[1, 2]])
negMatrix = tf.negative(x)
result = negMatrix.eval()
print(result)
sess.close()
产生此错误消息:
**AttributeError**: module 'tensorflow' has no attribute 'InteractiveSession'
【问题讨论】:
-
你用的是什么版本的tensorflow和jupyter?
-
this post 会回答你的问题吗?
-
让我知道它是否已使用 tensorflow v 1.13.2 解决
标签: python tensorflow jupyter interactive