class_docstr: Optimizer that implements the Adam algorithm.
  
  Adam optimization is a stochastic gradient descent method that is based on
  adaptive estimation of first-order and second-order moments.
  
  According to
  [Kingma et al., 2014](http://arxiv.org/abs/1412.6980),
  the method is "*computationally
  efficient, has little memory requirement, invariant to diagonal rescaling of
  gradients, and is well suited for problems that are large in terms of
  data/parameters*".
  
  Args:
      learning_rate: A float, a
          `keras.optimizers.schedules.LearningRateSchedule` instance, or
          a callable that takes no arguments and returns the actual value to
          use. The learning rate. Defaults to `0.001`.
      beta_1: A float value or a constant float tensor, or a callable
          that takes no arguments and returns the actual value to use. The
          exponential decay rate for the 1st moment estimates. Defaults to
          `0.9`.
      beta_2: A float value or a constant float tensor, or a callable
          that takes no arguments and returns the actual value to use. The
          exponential decay rate for the 2nd moment estimates. Defaults to
          `0.999`.
      epsilon: A small constant for numerical stability. This epsilon is
          "epsilon hat" in the Kingma and Ba paper (in the formula just before
          Section 2.1), not the epsilon in Algorithm 1 of the paper. Defaults
          to `1e-7`.
      amsgrad: Boolean. Whether to apply AMSGrad variant of this algorithm
          from the paper "On the Convergence of Adam and beyond". Defaults
          to `False`.
      {{base_optimizer_keyword_args}}
docstr: Initialize optimizer variables.
  
  Adam optimizer has 3 types of variables: momentums, velocities and
  velocity_hat (only set when amsgrad is applied),
  
  Args:
      var_list: list of model variables to build Adam variables on.
docstr_tok: ["Initialize","optimizer","variables",".","Adam","optimizer","has","3","types","of","variables",":","momentums",",","velocities","and","velocity_hat","(","only","set","when","amsgrad","is","applied",")",",","Args",":","var_list",":","list","of","model","variables","to","build","Adam","variables","on","."]
code: def build(self, var_list):
      """Initialize optimizer variables.
  
      Adam optimizer has 3 types of variables: momentums, velocities and
      velocity_hat (only set when amsgrad is applied),
  
      Args:
          var_list: list of model variables to build Adam variables on.
      """
      if self.built:
          return
      super().build(var_list)
      self._momentums = []
      self._velocities = []
      for var in var_list:
          self._momentums.append(
              self.add_variable_from_reference(
                  reference_variable=var, name="momentum"
              )
          )
          self._velocities.append(
              self.add_variable_from_reference(
                  reference_variable=var, name="velocity"
              )
          )
      if self.amsgrad:
          self._velocity_hats = []
          for var in var_list:
              self._velocity_hats.append(
                  self.add_variable_from_reference(
                      reference_variable=var, name="velocity_hat"
                  )
              )
  
file_path: keras/keras/optimizers/adam.py
imports: from keras import ops
  from keras.api_export import keras_export
  from keras.optimizers import optimizer
label_desc: Use image node_id 2 for calling the Adam obj's underlying member method code with example usage: obj.build(var_list) without return types