torch.Tensor.retain_grad¶ Tensor.retain_grad() → None¶ 啟用此 Tensor 在 backward() 期間填充其 grad。 這對於葉 Tensor 而言是無操作。