def METHOD_NAME(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().METHOD_NAME(var_list)
    self._r = []
    self._c = []
    self._v = []
    for var in var_list:
        if len(var.shape) < 2:
            # Don't factor if variable is of dimension < 2, but we still
            # need to create dummy variables as placeholder.
            with backend.name_scope(self.name, caller=self):
                self._r.append(
                    backend.Variable(0, name=var.name, trainable=False)
                )
                self._c.append(
                    backend.Variable(0, name=var.name, trainable=False)
                )
        else:
            # Always factor the last 2 dimenstions.
            r_shape = var.shape[:-1]
            c_shape = var.shape[:-2] + var.shape[-1]
            self._r.append(
                self.add_variable(
                    shape=r_shape,
                    dtype=var.dtype,
                    name=var.name,
                )
            )
            self._c.append(
                self.add_variable(
                    shape=c_shape,
                    dtype=var.dtype,
                    name=var.name,
                )
            )
        self._v.append(
            self.add_variable_from_reference(
                reference_variable=var, name="velocity"
            )
        )