【发布时间】:2018-02-16 02:06:59
【问题描述】:
我创建了一个visualization.py文件,内容如下:
import tensorflow as tf
a = tf.add(1, 2,)
b = tf.multiply(a, 3)
c = tf.add(4, 5,)
d = tf.multiply(c, 6,)
e = tf.multiply(4, 5,)
f = tf.div(c, 6,)
g = tf.add(b, d)
h = tf.multiply(g, f)
with tf.Session() as sess:
writer = tf.summary.FileWriter("output", sess.graph)
print(sess.run(h))
writer.close()
当我在命令提示符下运行它时,它会在我的当前目录中创建“输出”文件夹,“[Andrews-MacBook-Pro]: ~/coding/tensorflow/learningtensorflow/Visualization”
然后我在命令提示符中输入以下内容:
tensorboard --logdir=output
输出是:
TensorBoard 1.5.0 at http://Andrews-MacBook-Pro.local:6006 (Press CTRL+C to quit)
当我在浏览器中输入 http://Andrews-MacBook-Pro.local:6006 时,它会导致连接被重置页面(我使用的是 Firefox/MacOS,但在 Chrome 中也有同样的问题)。如何正确访问 Tensorflow 图表页面?
【问题讨论】:
-
是否需要使用
tensorboard --logdir=/coding/tensorflow/learningtensorflow/Visualization/output? -
不幸的是,它仍然会导致“连接已重置页面”。奇怪的是,如果我在浏览器中输入 0.0.0.0:6006 ,它会正确地将我连接到图形 TF 页面。我仍然想知道为什么 TF 命令提示符中的给定链接无法正常运行?
-
这个帖子也让我对这个问题有了更好的理解github.com/tensorflow/tensorboard/issues/89
标签: python python-3.x tensorflow tensorboard