我看过一个使用PyCharm运行此代码的示例:
a = tf.constant([1.0, 2.0, 3.0, 4.0, 5.0, 6.0], shape=[2, 3], name='a')
b = tf.constant([1.0, 2.0, 3.0, 4.0, 5.0, 6.0], shape=[3, 2], name='b')
c = tf.matmul(a, b)
sess = tf.Session(config=tf.ConfigProto(log_device_placement=True))
print(sess.run(c))
它将显示如下日志信息:
但是当我使用Spyder进行此操作时,它仅显示以下内容:
那么有什么方法可以让Spyder在使用Tensorflow时像PyCharm一样显示日志信息吗? Spyder应用程序中有任何设置吗?