【发布时间】:2016-12-06 05:14:03
【问题描述】:
我正在研究如何操作 tensorboard。
我在这里查看了演示:
https://www.tensorflow.org/code/tensorflow/examples/tutorials/mnist/mnist_with_summaries.py
它在我的笔记本电脑上运行良好。
其中大部分对我来说很有意义。
所以,我写了一个简单的 tensorflow 演示:
# tensorboard_demo1.py
import tensorflow as tf
sess = tf.Session()
with tf.name_scope('scope1'):
y1 = tf.constant(22.9) * 1.1
tf.scalar_summary('y1 scalar_summary', y1)
train_writer = tf.train.SummaryWriter('/tmp/tb1',sess.graph)
print('Result:')
# Now I should run the compute graph:
print(sess.run(y1))
train_writer.close()
# done
它似乎运行良好。
接下来我运行了一个简单的 shell 命令:
tensorboard --log /tmp/tb1
它告诉我浏览 0.0.0.0:6006
我做了什么。
网页告诉我:
未找到标量数据。
如何增强我的演示,以便它记录张量板将显示给我的标量摘要?
【问题讨论】: