parameters: (self, params)
docstring: r"""
          Averages parameters if ``step`` is no less than ``warmup_steps``
          and it can be divided by ``period``, where ``step`` is increased by 1
          at each iteration in the training loop.
docstring_summary: r"""
          Averages parameters if ``step`` is no less than ``warmup_steps``
          and it can be divided by ``period``, where ``step`` is increased by 1
          at each iteration in the training loop.
docstring_tokens: r Averages parameters if step is no less than warmup_steps and it can be divided by period where step is increased by 1 at each iteration in the training loop .
function: def average_parameters(self, params):
          r"""
          Averages parameters if ``step`` is no less than ``warmup_steps``
          and it can be divided by ``period``, where ``step`` is increased by 1
          at each iteration in the training loop.
          """
          if (
              self.step >= self.warmup_steps
              and (self.step - self.warmup_steps) % self.period == 0
          ):
              utils.average_parameters(iter(params), self.process_group)
          self.step += 1
function_tokens: def average_parameters ( self , params ) : if ( self . step >= self . warmup_steps and ( self . step - self . warmup_steps ) % self . period == 0 ) : utils . average_parameters ( iter ( params ) , self . process_group ) self . step += 1