torch.Tensor.requires_grad — PyTorch 2.2 documentationIs True if gradients need to be computed for this Tensor, False otherwise.https://pytorch.org/docs/stable/generated/torch.Tensor.requires_grad.html