I am trying to visualize a model I created using Tensorboard with Pytorch but when running tensorboard and going to the graph tab nothing is shown, im adding my code for reference, also im adding a screen-shot of my conda env for all the dependencies

from torch.utils.tensorboard import SummaryWriter 

writer = SummaryWriter()
images, labels = next(iter(trainloader))
grid = torchvision.utils.make_grid(images)

writer.add_image('images', grid)
writer.add_graph(model=model, input_to_model=images, verbose=True)

Conda env running the code

Screenshot of the tensorboard trying to display my model graph

  • $\begingroup$ This question is probably better suited for stack-overflow, where you have a tensorboard tag (and a bigger community). $\endgroup$ Commented Aug 29, 2019 at 16:12

1 Answer 1


I had the same problem. Check out this thread: https://github.com/pytorch/pytorch/issues/24157

TLDR: Update PyTorch to PyTorch-nightly and the problem should be solved. https://pytorch.org/get-started/locally/


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.