How to use Tensorboard with PyTorch

Let’s directly dive in. The thing here is to use Tensorboard to plot your PyTorch trainings. For this, I use TensorboardX which is a nice interface communicating Tensorboard avoiding Tensorflow dependencies.

First install the requirements;

Things thereafter very easy as well, but you need to know how you need to communicate with the board to show your training and it is not that easy, if you don’t know Tensorboard hitherto.

You can also see the embedding of your dataset

This is also how you can plot your model graph. The important part is to give the output tensor to writer as well with you model. So that, it computes the tensor shapes in between. I also need to say, it is very slow for large models.