TensorBoard

Learn about what TensorBoard is, how you can run it on your Jupyter notebook, and how to test and run it.

TensorBoard introduction

TensorBoard is a very useful visualization tool from PyTorch’s competing framework, Tensorflow. And you can use this with PyTorch as well, which provides classes and methods for us to integrate TensorBoard with our model.

Running TensorBoard inside a notebook

First, we need to load Tensorboard’s extension for Jupyter:

Press + to interact
# Load the TensorBoard notebook extension
%load_ext tensorboard

Then, we run Tensorboard using the newly available magic:

Press + to interact
# Running the TensorBoard notebook extension
%tensorboard --logdir runs

The magic above tells TensorBoard to look for logs inside the folder specified by the logdir argument: runs ...