SummaryWriter.add_graph
borks with simple example
#38614
Labels
oncall: visualization
Related to visualization in PyTorch, e.g., tensorboard
馃悰 Bug
Something funky is happening with
SummaryWriter.add_graph
. I was actually trying to dumb down some code from a private repo into a toy example to reproduce our issue, and ran into separate issue where aRuntimeError
was thrown and the message told me to report it as a bug 馃し . Here's a picture of the stacktrace:To Reproduce
Code snippet:
The error occurs with
writer.add_graph
- if that line is commented out, everything is fine.Expected behavior
No error should be thrown.
Environment
Additional context
I was actually trying to recreate an issue I was having where if I passed multiple GPUs into
DataParallel
,writer.add_graph
would throw the errorCannot insert a Tensor that requires grad as a constant. Consider making it a parameter or input, or detaching the gradient
, but if I only passed in one GPU, it would not throw that error. My original error when passing in multiple GPUs seems related to #30459, #28206, and #24904, although I'm not sure if the error in from this code snippet is related.cc @suo
The text was updated successfully, but these errors were encountered: