tensorboardX

1、安装tensorboardX

2、安装tensorflow

3、在Xshell中增加隧道监听,tensorboard是6006端口

tensorboardX

4、程序将需要做图的数据写入log文件,注意在写完后要增加writer.close(),否则回报错:Unable to get first event timestamp for run .: No event timestamp could be found

from tensorboardX import SummaryWriter
writer = SummaryWriter('runs/scalar_example')
for i in range(10):
    writer.add_scalar('quadratic', i**2, global_step=i)
    writer.add_scalar('exponential', 2**i, global_step=i)
writer.close()

5、运行程序后,在命令行输入:tensorboard --logdir "your path"

6、在本地,打开服务器,输入:localhost:6006,成功出现

参考:https://blog.****.net/u014767662/article/details/82911359

https://blog.****.net/bigbennyguo/article/details/87956434