on-internet
← Community

How to use torch.utils.tensorboard's SummaryWriter add_graph with dictionary outputs?

Stack Overflow ·

I have a PyTorch model that inherits from nn.Module and that has a forward method which returns a dictionary containing multiple tensors (stored as values). When I try to log this model to TensorBoard using torch.utils.tensorboard's SummaryWriter.add_graph() method I receive the following error: RuntimeError("Tracer cannot infer type of <output dictionary> How can I use add_graph() when the model's forward() method returns a dictionary? Edit 1: Complete stack trace up to error: WARNING:root:This caffe2 python run does not have GPU support. Will run in CPU only mode. Only tensors or tuples of t

Comments

Sign in or sign up to comment and upvote.

No comments yet.