Can I use TensorBoard with Google Colab?

前端 未结 19 2943
滥情空心
滥情空心 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

    TensorBoard for TensorFlow running on Google Colab using tensorboardcolab. This uses ngrok internally for tunnelling.

    1. Install TensorBoardColab

    !pip install tensorboardcolab

    1. Create a tensorboardcolab object

    tbc = TensorBoardColab()

    This automatically creates a TensorBoard link that can be used. This Tensorboard is reading the data at './Graph'

    1. Create a FileWriter pointing to this location

    summary_writer = tbc.get_writer()

    tensorboardcolab library has the method that returns FileWriter object pointing to above './Graph' location.

    1. Start adding summary information to Event files at './Graph' location using summary_writer object

    You can add scalar info or graph or histogram data.

    Reference: https://github.com/taomanwai/tensorboardcolab

提交回复
热议问题