首页 > 技术文章 > 远程访问服务器tensorboard

gdut-gordon 2018-10-24 15:30 原文

转自https://blog.csdn.net/Hansry/article/details/83004648

 

1. 在登录远程服务器的时候使用命令:

ssh -L 16006:127.0.0.1:6006 server_name@server.address

其中server_name指工作站名字,server.address指工作站IP

 

2. 加载训练模型时,在终端中运行如下命令:

tensorboard --logdir="/path/to/log-directory"

(其中,/path/to/log-directory为自己设定的日志存放路径)

 

3. 最后在浏览器中输入: http://127.0.0.1:16006/

 

报错情况一:端口被占用

即已经有人在工作站上使用了6006端口,报错信息如下:

ERROR:tensorflow:TensorBoard attempted to bind to port 6006, but it was already in use
TensorBoard attempted to bind to port 6006, but it was already in use

可切换成8008端口,具体操作为将上面登录远程服务器的命令改为以下命令:

ssh -L 18008:127.0.0.1:8008 server_name@server.address

 

接着加载模型时使用:

tensorboard --logdir="/path/to/log-directory" --port=8008

 

推荐阅读