評價此頁

torch.Tensor.retains_grad#

Tensor.retains_grad#

如果此 Tensor 是非葉節點且在 backward() 期間其 grad 被啟用以進行填充,則為 True,否則為 False