code: def __init__(
      self,
      var_list,
      *,
      beta1=0.9,
      beta2=0.999,
      epsilon=1e-08,
      scale_grad_by_procs=True,
      comm=None,
  ):
      self.var_list = var_list
      self.beta1 = beta1
      self.beta2 = beta2
      self.epsilon = epsilon
      self.scale_grad_by_procs = scale_grad_by_procs
      size = sum(U.numel(v) for v in var_list)
      self.m = np.zeros(size, "float32")
      self.v = np.zeros(size, "float32")
      self.t = 0
      self.setfromflat = U.SetFromFlat(var_list)
      self.getflat = U.GetFlat(var_list)
      self.comm = (
          MPI.COMM_WORLD if comm is None and MPI is not None else comm
      )
  
file_path: baselines/baselines/common/mpi_adam.py
imports: import baselines.common.tf_util
  import tensorflow
  import numpy
label_desc: Use image node_id 1 to create a new MpiAdam object from inherited base classes: object with example: obj = MpiAdam(var_list)