Is there any way to use TensorBoard when training a TensorFlow model on Google Colab?
Simple and easiest way I have found so far:
Get setup_google_colab.py file using wget
!wget https://raw.githubusercontent.com/hse-aml/intro-to- dl/master/setup_google_colab.py -O setup_google_colab.py
import setup_google_colab
To run tensorboard in background, expose port and click on the link.
I am assuming that you have proper added value to visualize in your summary and then merge all summaries.
import os
os.system("tensorboard --logdir=./logs --host 0.0.0.0 --port 6006 &")
setup_google_colab.expose_port_on_colab(6006)
After running above statements you will prompted with a link like:
Open https://a1b2c34d5.ngrok.io to access your 6006 port
Refer following git for further help:
https://github.com/MUmarAmanat/MLWithTensorflow/blob/master/colab_tensorboard.ipynb