torch.autograd.FunctionCtx.set_materialize_grads
FunctionCtx.set_materialize_grads(value: boolean): voidSets whether to materialize zero gradients.
If set to false, undefined gradients will be passed as None to backward() instead of being materialized as zero tensors.
Parameters
valueboolean- Whether to materialize zero gradients