original_docstring: Sets the learning rate to the initial LR decayed by 2 every 20 epochs
docstring: Sets the learning rate to the initial LR decayed by 2 every 20 epochs
docstring_tokens: Sets the learning rate to the initial LR decayed by 2 every 20 epochs
code: def update_learning_rate(self, epoch):
          """Sets the learning rate to the initial LR decayed by 2 every 20 epochs"""
          lr = self.lr * (0.1 ** (epoch))
          for optimizer in self.optimizers:
              for param_group in optimizer.param_groups:
                  param_group['lr'] = lr
          print('learning rate = %.7f' % lr)
          return lr
code_tokens: def update_learning_rate ( self , epoch ) : lr = self . lr * ( 0.1 ** ( epoch ) ) for optimizer in self . optimizers : for param_group in optimizer . param_groups : param_group [ 'lr' ] = lr print ( 'learning rate = %.7f' % lr ) return lr
short_docstring: Sets the learning rate to the initial LR decayed by 2 every 20 epochs
short_docstring_tokens: Sets the learning rate to the initial LR decayed by 2 every 20 epochs
comment: """Sets the learning rate to the initial LR decayed by 2 every 20 epochs"""