【问题标题】:TensorBoard doesn't load properlyTensorBoard 无法正确加载
【发布时间】:2019-08-08 01:02:36
【问题描述】:

安装在我的机器上时,Tensorboard 似乎无法正确加载。我在虚拟环境中使用 Python 3.7 和 Tensorboard 1.13.1。我正在运行一个非常简单的示例脚本:

import numpy as np
import tensorflow as tf

a = tf.constant(3.0)
b = tf.constant(4.0)
c = a+b

sess = tf.Session()

print(sess.run(c))

writer = tf.summary.FileWriter('.')
writer.add_graph(tf.get_default_graph())
writer.flush()

sess.close()

tf.reset_default_graph()

当我在虚拟环境中运行 tensorboard 时,我收到了

TensorBoard 1.13.1 at http://S13:6006 (Press CTRL+C to quit)

现在,当我在 Firefox 上打开页面时,我得到以下结果: Firefox Result

在全新安装 Chromium 时,我得到: Chrome

它永远不会完成加载。

我正在运行 Fedora 25.01。我试过在网上搜索这个错误,但找不到任何东西。任何形式的帮助都将不胜感激。

PS:我设法让 tensorflow+board 在具有非常相似设置的 Fedora 机器上运行。在那里,张量板可以正常工作。

编辑:Tensorboard 不会在控制台中显示任何错误或警告。

【问题讨论】:

标签: tensorflow tensorboard


【解决方案1】:

我把你的代码改成这样:

import tensorflow as tf

a = tf.constant(3.0, name='a')
b = tf.constant(4.0, name='b')
c = tf.add(a, b, name='add_operation')


writer = tf.summary.FileWriter('./dummy')
with tf.Session() as sess:
    sess.run(c)
    writer.add_graph(tf.get_default_graph())

然后在相同工作目录的终端中,键入:tensorboard --logdir='./dummy/' --port 6006。请尝试告诉我它是否有效

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2020-09-21
    • 2018-12-15
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-11-17
    相关资源
    最近更新 更多