parameters: (self, params, lr)
docstring: Parameter ``params``:
              dictionary ``(name: variable)`` of differentiable parameters to be
              optimized.
  
          Parameter ``lr``:
              learning rate
docstring_summary: Parameter ``params``:
              dictionary ``(name: variable)`` of differentiable parameters to be
              optimized.
docstring_tokens: Parameter params : dictionary ( name : variable ) of differentiable parameters to be optimized .
function: def __init__(self, params, lr):
          """
          Parameter ``params``:
              dictionary ``(name: variable)`` of differentiable parameters to be
              optimized.
  
          Parameter ``lr``:
              learning rate
          """
          self.set_learning_rate(lr)
          self.params = params
          if not params.all_differentiable():
              raise Exception('Optimizer.__init__(): all parameters should '
                              'be differentiable!')
          self.state = {}
          for k, p in self.params.items():
              ek.set_requires_gradient(p)
              self._reset(k)
function_tokens: def __init__ ( self , params , lr ) : self . set_learning_rate ( lr ) self . params = params if not params . all_differentiable ( ) : raise Exception ( 'Optimizer.__init__(): all parameters should ' 'be differentiable!' ) self . state = { } for k , p in self . params . items ( ) : ek . set_requires_gradient ( p ) self . _reset ( k )