oneflow.Tensor.requires_grad

Tensor.requires_grad

Is True if gradient need to be computed for this Tensor, False otherwise.

Compatible with PyTorch.