Closed patrick-kidger closed 3 years ago
PyTorch has a bug when differentiating wrt unused inputs: https://github.com/pytorch/pytorch/issues/39784
If there are unused inputs that are unused globally, then it will backprop through the whole graph, even unrelated components. As such using the allow_unused flag is dangerous without this workaround.
allow_unused
PyTorch has a bug when differentiating wrt unused inputs: https://github.com/pytorch/pytorch/issues/39784
If there are unused inputs that are unused globally, then it will backprop through the whole graph, even unrelated components. As such using the
allow_unused
flag is dangerous without this workaround.