class_docstr: Adam optimizer.
docstr: Constructor for Adam optimizer class.
  
  Args:
      vc: collection of variables to optimize.
      beta1: value of Adam's beta1 hyperparameter. Defaults to 0.9.
      beta2: value of Adam's beta2 hyperparameter. Defaults to 0.999.
      eps: value of Adam's epsilon hyperparameter. Defaults to 1e-8.
code: def __init__(
      self,
      vc: VarCollection,
      beta1: float = 0.9,
      beta2: float = 0.999,
      eps: float = 1e-8,
  ):
      """Constructor for Adam optimizer class.
  
      Args:
          vc: collection of variables to optimize.
          beta1: value of Adam's beta1 hyperparameter. Defaults to 0.9.
          beta2: value of Adam's beta2 hyperparameter. Defaults to 0.999.
          eps: value of Adam's epsilon hyperparameter. Defaults to 1e-8.
      """
      self.beta1 = beta1
      self.beta2 = beta2
      self.eps = eps
      self.step = StateVar(
          jn.array(0, jn.uint32), reduce=lambda x: x[0]
      )
      self.train_vars = ModuleList(
          TrainRef(x) for x in vc.subset(TrainVar)
      )
      self.m = ModuleList(
          StateVar(jn.zeros_like(x.value)) for x in self.train_vars
      )
      self.v = ModuleList(
          StateVar(jn.zeros_like(x.value)) for x in self.train_vars
      )
  
file_path: objax/objax/optimizer/adam.py
imports: from typing import List, Optional
  from jax import numpy
  from objax import functional
  from objax.module import Module, ModuleList
  from objax.typing import JaxArray
  from objax.util import class_name
  from objax.variable import TrainRef, StateVar, TrainVar, VarCollection
label_desc: Use image node_id 1 to create a new Adam object from inherited base classes: Module with example: obj = Adam(vc, beta1, beta2, eps)