# torch 2.15.0 (BSD-3-Clause), harvested by tools/harvest_corpus.py
=== input
Register a post-hook for the :meth:`~torch.nn.Module.state_dict` method.

        It should have the following signature::
            hook(module, state_dict, prefix, local_metadata) -> None or state_dict

        The registered hooks can modify the ``state_dict`` inplace or return a new one.
        If a new ``state_dict`` is returned, it will only be respected if it is the root
        module that :meth:`~nn.Module.state_dict` is called from.
        
=== parse google
short_description: 'Register a post-hook for the :meth:`~torch.nn.Module.state_dict` method.'
long_description: |
  It should have the following signature::
      hook(module, state_dict, prefix, local_metadata) -> None or state_dict
  
  The registered hooks can modify the ``state_dict`` inplace or return a new one.
  If a new ``state_dict`` is returned, it will only be respected if it is the root
  module that :meth:`~nn.Module.state_dict` is called from.
blank_after_short_description: True
blank_after_long_description: False
style: google
=== detect
rest
=== compose google
Register a post-hook for the :meth:`~torch.nn.Module.state_dict` method.

It should have the following signature::
    hook(module, state_dict, prefix, local_metadata) -> None or state_dict

The registered hooks can modify the ``state_dict`` inplace or return a new one.
If a new ``state_dict`` is returned, it will only be respected if it is the root
module that :meth:`~nn.Module.state_dict` is called from.
