torch.Tensor.retains_grad¶
- Tensor.retains_grad¶
- Is - Trueif this Tensor is non-leaf and its- gradis enabled to be populated during- backward(),- Falseotherwise.
Is True if this Tensor is non-leaf and its grad is enabled to be
populated during backward(), False otherwise.