Tensorboard无法找到事件的时间戳

问题描述 投票:0回答:1

我可以打开tensorboard向我显示的网站,但其中没有数据,cmd表示无法找到事件的第一个时间戳。

我输入这样的东西

./tensorboard --logdir = G:/ final / log_1

我在win7和win10上尝试了很多次,我确信路径是正确的,但该网站没有数据。

我的部分代码

with tf.name_scope('input_layer'):
    xs = tf.placeholder(tf.float32, [1, 9],name="x_input")
    ys = tf.placeholder(tf.float32, [1, 1],name="y_input")

我的代码用于创建事件文件,它将创建一个名为log_1的文件,并且事件文件将在该文件中

writer = tf.summary.FileWriter(r'log_1/',sess.graph)
writer.close()

我希望网站可以向我展示图表,但是,它没有显示任何内容

python tensorflow tensorboard
1个回答
0
投票

1)首先,如果你在像Jupyter这样的编辑器上运行它,请尝试重新启动内核。

2)其次,我不知道你的整个代码,但你需要做的一件事是

merged = tf.summary.merge_all() summary = sess.run(merged) writer.add_summary(summary, index)

您的代码的一个问题可能是您正在创建所有摘要变量,但实际上并未将其添加到编写器中。所以在关闭它之前使用上面的add_summary函数。我最近遇到了同样的问题,以上所有问题都解决了。

© www.soinside.com 2019 - 2024. All rights reserved.