mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-06 12:20:52 +01:00
doc fix nn.Module: docstring should come after class variable (#72912)
Summary:
Fixes https://github.com/pytorch/pytorch/issues/72862
Pull Request resolved: https://github.com/pytorch/pytorch/pull/72912
Reviewed By: cpuhrsch
Differential Revision: D34286017
Pulled By: jbschlosser
fbshipit-source-id: d172f7600e7f66c30187996ee42c72bf273643cc
(cherry picked from commit d9f9b5b418)
This commit is contained in:
parent
bbac8c9c48
commit
352eeb2ef9
|
|
@ -237,6 +237,7 @@ class Module:
|
|||
|
||||
dump_patches: bool = False
|
||||
|
||||
_version: int = 1
|
||||
r"""This allows better BC support for :meth:`load_state_dict`. In
|
||||
:meth:`state_dict`, the version number will be saved as in the attribute
|
||||
`_metadata` of the returned state dict, and thus pickled. `_metadata` is a
|
||||
|
|
@ -247,7 +248,6 @@ class Module:
|
|||
be bumped, and the module's `_load_from_state_dict` method can compare the
|
||||
version number and do appropriate changes if the state dict is from before
|
||||
the change."""
|
||||
_version: int = 1
|
||||
|
||||
training: bool
|
||||
_is_full_backward_hook: Optional[bool]
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user