$ tensorboard --logdir ./
と打ち、
TensorBoard 2.2.1 at http://localhost:6006/ (Press CTRL+C to quit)
が出力されたが、
http://localhost:6006/
でtensorboardが見れないとき。
環境
自分のPCはwindows
リモートサーバーはlinux
経緯
puttyを使いリモートログインをしてサーバーにログインした。
そこでtensorboardを使った。
アウトプットされたサイトにアクセスできなかった。
解決策前提
user名remoteでサーバー名serverを使ってリモートログインする。
remote@server's password:passward
現在のディレクトリに入っているtensorboardを起動。
[remote@server ~]$ tensorboard --logdir ./
Serving TensorBoard on localhost; to expose to the network, use a proxy or pass --bind_all
TensorBoard 2.2.1 at http://localhost:6006/ (Press CTRL+C to quit)
解決策
user名userのコマンドプロンプトを開く。このuser名は例。
そして以下のように入力する。
C:\Users\user>ssh -L (ポート番号):localhost:6006 (リモート側のuser名)@(リモート側のサーバーのIPアドレス)
(ポート番号)には49513~65535のような空いているポート番号。
(リモート側のuser名)remoteのような名前。
(リモート側のサーバーのIPアドレス)987.098.082.99 のような数字。
上記のコードをコマンドプロンプトに打ち込むことで、
http://localhost:(ポート番号)/
からtensorflowが見れる。
私の場合
C:\Users\user>ssh -L 49513:localhost:6006 remote@987.098.082.99
http://localhost:49513/からtensorboardが見れる。
補足
(リモート側のサーバーのIPアドレス)は非常にプライベートな数字である。
もし自分のサーバーでない他のサーバーにリモートログインするとき、(リモート側のサーバーのIPアドレス)は見れないようになっている時がある。
そのときは、そのサーバーの管理者に(リモート側のサーバーのIPアドレス)を聞こう。