parameters: (self, lr)
docstring: Sets a new learning rate of the optimizer.
  
          Parameters
          ----------
          lr : float
              The new learning rate of the optimizer.
docstring_summary: Sets a new learning rate of the optimizer.
docstring_tokens: Sets a new learning rate of the optimizer .
function: def set_learning_rate(self, lr):
          """Sets a new learning rate of the optimizer.
  
          Parameters
          ----------
          lr : float
              The new learning rate of the optimizer.
          """
          if self.lr_scheduler is not None: # pylint: disable=no-else-raise
              raise UserWarning("LRScheduler of the optimizer has already been "
                                "defined. Note that set_learning_rate can mutate "
                                "the value of the learning rate of the optimizer "
                                "only when the LRScheduler of the optimizer is "
                                "undefined.")
          else:
              self.lr = lr
function_tokens: def set_learning_rate ( self , lr ) : if self . lr_scheduler is not None : # pylint: disable=no-else-raise raise UserWarning ( "LRScheduler of the optimizer has already been " "defined. Note that set_learning_rate can mutate " "the value of the learning rate of the optimizer " "only when the LRScheduler of the optimizer is " "undefined." ) else : self . lr = lr