I'm new to Tensorflow and would greatly benefit from some visualizations of what I'm doing. I understand that Tensorboard is a useful visualization tool, but how do I run it on my remote Ubuntu machine?
where the -p 6006 is the default port of TensorBoard.
You can visualize the model graph, losses, accuracy, etc when your model is under training. It is a very helpful tool that can be used to monitor the model that is getting trained on a large dataset. You can use Tensorboard not only with TensorFlow but also with Keras.
To start a TensorBoard session, open the Command Palette (Ctrl+Shift+P) and search for the command Python: Launch TensorBoard. Afterwards, you'll be prompted to select the folder where your TensorBoard log files are located.
Here is what I do to avoid the issues of making the remote server accept your local external IP:
-L
to transfer the port 6006
of the remote server into the port 16006
of my machine (for instance): ssh -L 16006:127.0.0.1:6006 olivier@my_server_ip
What it does is that everything on the port 6006
of the server (in 127.0.0.1:6006
) will be forwarded to my machine on the port 16006
.
tensorboard --logdir log
with the default 6006
portYou can port-forward with another ssh
command that need not be tied to how you are connecting to the server (as an alternative to the other answer). Thus, the ordering of the below steps is arbitrary.
from your local machine, run
ssh -N -f -L localhost:16006:localhost:6006 <user@remote>
on the remote machine, run:
tensorboard --logdir <path> --port 6006
Then, navigate to (in this example) http://localhost:16006 on your local machine.
(explanation of ssh command:
-N
: no remote commands
-f
: put ssh in the background
-L <machine1>:<portA>:<machine2>:<portB>
:
forward <machine1>:<portA>
(local scope) to <machine2>:<portB>
(remote scope)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With