nlpmodels/utils/optims.py
def step(self):
        """
        Main method called during training.
        """
        # change learning rate in optimizer
        self._step += 1
        self._rate = self.calc_lr(self._step)
        if self._optimizer is not None:
            for param in self._optimizer.param_groups:
                param['lr'] = self._rate
            # call optimizer's step function
            self._optimizer.step()

        Main method called during training.
        
Main method called during training.
Main method called during training .
def step(self):
        self._step += 1
        self._rate = self.calc_lr(self._step)
        if self._optimizer is not None:
            for param in self._optimizer.param_groups:
                param['lr'] = self._rate
            self._optimizer.step()
def step ( self ) : self . _step += 1 self . _rate = self . calc_lr ( self . _step ) if self . _optimizer is not None : for param in self . _optimizer . param_groups : param [ 'lr' ] = self . _rate self . _optimizer . step ( )
Main method called during training.
Main method called during training .
"""
        Main method called during training.
        """ # change learning rate in optimizer # call optimizer's step function
self