tensorboard 使用
首先我们随便定义一个图
import tensorflow as tf
x = tf.constant(6,name='x')
y = tf.constant(8,name='y')
z = tf.add(x,y,name='z')
with tf.Session() as sess:
writer = tf.summary.FileWriter('./graphs/const_add',sess.graph)
print(sess.run(x))
writer.close()
然后打开终端,输入
tensorboard --logdir=./graphs --port 7001
最后在浏览器中输入:localhost :7001
最后可以看到: