【发布时间】:2017-08-30 03:59:56
【问题描述】:
有一种方法可以用 Python 创建文件,可以通过 TensorBoard 进行可视化(参见here)。我试过这段代码,效果很好。
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:
print(sess.run(h))
with tf.Session() as sess:
writer = tf.summary.FileWriter("output", sess.graph)
print(sess.run(h))
writer.close()
现在我正在使用 TensorFlow API 来创建我的计算。 如何使用 TensorBoard 可视化我的计算?
C++ api 中也有一个FileWrite 接口,但我没有看到任何示例。是同一个界面吗?
【问题讨论】:
标签: api tensorflow tensorboard