Short name describing what triggered the graph break
autograd.grad with already consumed grad_fn
Values or code snippet captured at the break point
double consumed grad_fns: {len(double_consumed)}
Explanation of why the graph break was triggered
torch.autograd.grad() is trying to consume grad_fns that were already consumed by a previous autograd.grad() call. This would cause ‘backward through graph a second time’ errors at runtime.
Hints on how to resolve the graph break