parameters: (
          self,
          **kwargs,
      )
return_statement: return _DDPJoinHook(
              self, divide_by_initial_world_size=divide_by_initial_world_size
          )
docstring: r"""
          Returns the DDP join hook, which enables training on uneven inputs by
          shadowing the collective communications in the forward and backward
          passes.
  
          Arguments:
              kwargs (dict): a :class:`dict` containing any keyword arguments
                  to modify the behavior of the join hook at run time; all
                  :class:`Joinable` instances sharing the same join context
                  manager are forwarded the same value for ``kwargs``.
  
          The hook supports the following keyword arguments:
              divide_by_initial_world_size (bool, optional):
                  If ``True``, then gradients are divided by the initial world
                  size that DDP was launched with.
                  If ``False``, then gradients are divided by the effective world
                  size (i.e. the number of non-joined processes), meaning that
                  the uneven inputs contribute more toward the global gradient.
                  Typically, this should be set to ``True`` if the degree of
                  unevenness is small but can be set to ``False`` in extreme
                  cases for possibly better results.
                  Default is ``True``.
docstring_summary: r"""
          Returns the DDP join hook, which enables training on uneven inputs by
          shadowing the collective communications in the forward and backward
          passes.
docstring_tokens: r Returns the DDP join hook which enables training on uneven inputs by shadowing the collective communications in the forward and backward passes .
function: def join_hook(
          self,
          **kwargs,
      ):
          r"""
          Returns the DDP join hook, which enables training on uneven inputs by
          shadowing the collective communications in the forward and backward
          passes.
  
          Arguments:
              kwargs (dict): a :class:`dict` containing any keyword arguments
                  to modify the behavior of the join hook at run time; all
                  :class:`Joinable` instances sharing the same join context
                  manager are forwarded the same value for ``kwargs``.
  
          The hook supports the following keyword arguments:
              divide_by_initial_world_size (bool, optional):
                  If ``True``, then gradients are divided by the initial world
                  size that DDP was launched with.
                  If ``False``, then gradients are divided by the effective world
                  size (i.e. the number of non-joined processes), meaning that
                  the uneven inputs contribute more toward the global gradient.
                  Typically, this should be set to ``True`` if the degree of
                  unevenness is small but can be set to ``False`` in extreme
                  cases for possibly better results.
                  Default is ``True``.
          """
          divide_by_initial_world_size = kwargs.get("divide_by_initial_world_size", True)
          return _DDPJoinHook(
              self, divide_by_initial_world_size=divide_by_initial_world_size
          )
function_tokens: def join_hook ( self , * * kwargs , ) : divide_by_initial_world_size = kwargs . get ( "divide_by_initial_world_size" , True ) return _DDPJoinHook ( self , divide_by_initial_world_size = divide_by_initial_world_size )