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