mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-21 05:34:18 +08:00
[easy] Small rendering fix in Tensor.module_load doc (#130489)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/130489 Approved by: https://github.com/janeyx99
This commit is contained in:
committed by
PyTorch MergeBot
parent
95046c86e3
commit
619029e892
@ -722,7 +722,7 @@ class Tensor(torch._C.TensorBase):
|
||||
It is expected that ``self`` is a parameter or buffer in an ``nn.Module`` and ``other`` is the
|
||||
value in the state dictionary with the corresponding key, this method defines
|
||||
how ``other`` is remapped before being swapped with ``self`` via
|
||||
:func:`~torch.utils.swap_tensors`` in ``module.load_state_dict()``.
|
||||
:func:`~torch.utils.swap_tensors` in :meth:`~nn.Module.load_state_dict`.
|
||||
|
||||
.. note::
|
||||
This method should always return a new object that is not ``self`` or ``other``.
|
||||
|
Reference in New Issue
Block a user