您的位置:首页 > 其它

使用localhost访问远程tensorboard

2017-05-07 14:20 2101 查看

场景与问题

tensorflow程序运行在远程服务器,tensorboard启动后访问地址为:
0.0.0.0:6006
。这样没法用自己机器上的浏览器访问tensorboard。

解决办法

1 . 连接ssh时,将服务器的
6006
端口重定向到自己机器上来:

ssh -L 16006:127.0.0.1:6006 username@remote_server_ip


其中:
16006:127.0.0.1
代表自己机器上的
16006
号端口,
6006
是服务器上tensorboard使用的端口。

2 . 在服务器上使用
6006
端口正常启动tensorboard:

tensorboard --logdir=xxx --port=6006


3 . 在本地浏览器中输入地址:

127.0.0.1:16006


Reference

http://stackoverflow.com/questions/37987839/how-can-i-run-tensorboard-on-a-remote-server
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  tensorboar tensorflow