【Tensorboard】简单入门

程序部分

直接上例子

import tensorflow as tf

width = tf.placeholder(tf.int32,name='width')
height = tf.placeholder(tf.int32,name='height')
area = tf.multiply(width,height,name='area')

with tf.Session() as sess:
    sess.run(tf.global_variables_initializer())
    writer = tf.summary.FileWriter("E://TensorBoard//test",sess.graph)
    print(sess.run(area, feed_dict={width:6,height:8}))
writer.close()

运行结果:

48

命令行窗口

打开命令行窗口输入

tensorboard --logdir=E://TensorBoard//test

如下:

【Tensorboard】简单入门

在浏览器中输入上面的链接:http://DESKTOP-S07TMFJ:6006

结果

得到下面的结果。

【Tensorboard】简单入门

好像我在360浏览器上不行,在谷歌浏览器上没问题。