GB1381

Graph-Break Type

Short name describing what triggered the graph break

autograd.grad with already consumed grad_fn

Context

Values or code snippet captured at the break point

double consumed grad_fns: {len(double_consumed)}

Explanation

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

Hints on how to resolve the graph break

Additional Information

Click here to add Additional Info

Back to Registry