在Jupyter中运行tf.InteractiveSession时遇到问题

问题描述

我在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'

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)