\[-1.ex]      &\rule{110mm}{0.4pt}
      \[-1.ex] \end{aligned}
Nesterov momentum is based on the formula from On the importance of
   initialization and momentum in deep learning.
Parameters:
      * params (iterable) -- iterable of parameters to optimize
        or dicts defining parameter groups
  * **lr** (*float*) -- learning rate

  * **momentum** (*float**, **optional*) -- momentum factor
    (default: 0)

  * **weight_decay** (*float**, **optional*) -- weight decay (L2
    penalty) (default: 0)

  * **dampening** (*float**, **optional*) -- dampening for
    momentum (default: 0)

  * **nesterov** (*bool**, **optional*) -- enables Nesterov
    momentum (default: False)

  * **maximize** (*bool**, **optional*) -- maximize the params
    based on the objective, instead of minimizing (default: False)

  * **foreach** (*bool**, **optional*) -- whether foreach
    implementation of optimizer is used (default: None)
