class_docstr: Stochastic gradient descent optimizer with momentum
  
  Parameters
  ----------
  params : list, length = len(coefs_) + len(intercepts_)
      The concatenated list containing coefs_ and intercepts_ in MLP model.
      Used for initializing velocities and updating params
  
  learning_rate_init : float, default=0.1
      The initial learning rate used. It controls the step-size in updating
      the weights
  
  lr_schedule : {'constant', 'adaptive', 'invscaling'}, default='constant'
      Learning rate schedule for weight updates.
  
      -'constant', is a constant learning rate given by
       'learning_rate_init'.
  
      -'invscaling' gradually decreases the learning rate 'learning_rate_' at
        each time step 't' using an inverse scaling exponent of 'power_t'.
        learning_rate_ = learning_rate_init / pow(t, power_t)
  
      -'adaptive', keeps the learning rate constant to
       'learning_rate_init' as long as the training keeps decreasing.
       Each time 2 consecutive epochs fail to decrease the training loss by
       tol, or fail to increase validation score by tol if 'early_stopping'
       is on, the current learning rate is divided by 5.
  
  momentum : float, default=0.9
      Value of momentum used, must be larger than or equal to 0
  
  nesterov : bool, default=True
      Whether to use nesterov's momentum or not. Use nesterov's if True
  
  power_t : float, default=0.5
      Power of time step 't' in inverse scaling. See `lr_schedule` for
      more details.
  
  Attributes
  ----------
  learning_rate : float
      the current learning rate
  
  velocities : list, length = len(params)
      velocities that are used to update params
docstr: Get the values used to update params with given gradients
  
  Parameters
  ----------
  grads : list, length = len(coefs_) + len(intercepts_)
      Containing gradients with respect to coefs_ and intercepts_ in MLP
      model. So length should be aligned with params
  
  Returns
  -------
  updates : list, length = len(grads)
      The values to add to params
docstr_tok: ["Get","the","values","used","to","update","params","with","given","gradients","Parameters","--","--","--","--","--","grads",":","list",",","length","=","len","(","coefs_",")","+","len","(","intercepts_",")","Containing","gradients","with","respect","to","coefs_","and","intercepts_","in","MLP","model",".","So","length","should","be","aligned","with","params","Returns","--","--","--","-","updates",":","list",",","length","=","len","(","grads",")","The","values","to","add","to","params"]
code: def _get_updates(self, grads):
      """Get the values used to update params with given gradients
  
      Parameters
      ----------
      grads : list, length = len(coefs_) + len(intercepts_)
          Containing gradients with respect to coefs_ and intercepts_ in MLP
          model. So length should be aligned with params
  
      Returns
      -------
      updates : list, length = len(grads)
          The values to add to params
      """
      updates = [
          self.momentum * velocity - self.learning_rate * grad
          for velocity, grad in zip(self.velocities, grads)
      ]
      self.velocities = updates
  
      if self.nesterov:
          updates = [
              self.momentum * velocity - self.learning_rate * grad
              for velocity, grad in zip(self.velocities, grads)
          ]
  
      return updates
  
file_path: scikit-learn/sklearn/neural_network/_stochastic_optimizers.py
imports: import numpy
label_desc: Use image node_id 4 for calling the SGDOptimizer obj's underlying member method code with example usage: obj._get_updates(grads) and returns: updates