Use localhost to access the tensorboard of the remote server

To run the code on the remote server, if you want to view it through tensorboard, you need to map the remote port to the local.

  1. When using SSH connection, redirect the server's port 6006 to the local port 16006:
ssh -L 16006:127.0.0.1:6006 username@remote_server_ip

16006:127.0.0.1 represents port 16006 of localhost, and 6006 represents the port of tensorboard service of the remote server.

  1. On the server, go to the folder where the log is located and start tensorboard:
tensorboard --logdir=xxx --port=6006
  1. Enter the address in a local browser:
127.0.0.1:16006

Guess you like

Origin blog.csdn.net/YuhsiHu/article/details/132138352