torch.Tensor.retains_grad¶ Tensor.retains_grad¶ 如果此 Tensor 是非葉節點且其 grad 在 backward() 期間被啟用以便填充,則為 True,否則為 False。