Can I use TensorBoard with Google Colab?

前端 未结 19 3011
滥情空心
滥情空心 2020-11-27 10:43

Is there any way to use TensorBoard when training a TensorFlow model on Google Colab?

19条回答
  •  囚心锁ツ
    2020-11-27 10:54

    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
    

提交回复
热议问题