- 安装tensorfboard模块
source activate tensorflow-gpu
pip install tensorboard
- Build tensorflow graph
import tensorflow as tf
in1 = tf.constant([1., 2.], name='in1')
in2 = tf.Variable(tf.random_normal([2]), name='in2')
out = tf.add(in1, in2, name='add')
#注意Windows环境下的的路径为了方便可以使用r'',或把\都替换成/或\\
writer = tf.summary.FileWriter('graphs/', tf.get_default_graph())
writer.close()
- Open a terminal and run the following code
source activate tensorflow-gpu
tensorboard -logdir=graphs\
- Copy the coming out path to your web browser
Enter: http://127.0.1.1:6006