update doc

This commit is contained in:
Dario Coscia
2025-03-17 12:23:26 +01:00
committed by FilippoOlivo
parent ae1fd2680f
commit 480140dd31
33 changed files with 265 additions and 196 deletions

View File

@@ -389,14 +389,15 @@ class LabelTensor(torch.Tensor):
def requires_grad_(self, mode=True):
"""
Override the requires_grad_ method to handle the labels in the new
tensor. For more details, see :meth:`torch.Tensor.requires_grad_`.
Override the :meth:`~torch.Tensor.requires_grad_` method to handle
the labels in the new tensor.
For more details, see :meth:`~torch.Tensor.requires_grad_`.
:param bool mode: A boolean value indicating whether the tensor should
track gradients.If `True`, the tensor will track gradients;
if `False`, it will not.
:return: The :class:`~pina.label_tensor.LabelTensor` itself with the
updated `requires_grad` state and retained labels.
updated ``requires_grad`` state and retained labels.
:rtype: LabelTensor
"""