class_docstr: The Adam optimizer defined in https://arxiv.org/abs/1412.6980.
docstr: Refer to parent class documentation.
docstr_tok: ["Refer","to","parent","class","documentation","."]
code: def _apply_gradients(self, grads, x, optim_state):
      """Refer to parent class documentation."""
      new_x = [None] * len(x)
      new_optim_state = {
          "t": optim_state["t"] + 1.0,
          "m": [None] * len(x),
          "u": [None] * len(x),
      }
      t = new_optim_state["t"]
      for i in xrange(len(x)):
          g = grads[i]
          m_old = optim_state["m"][i]
          u_old = optim_state["u"][i]
          new_optim_state["m"][i] = (
              self._beta1 * m_old + (1.0 - self._beta1) * g
          )
          new_optim_state["u"][i] = (
              self._beta2 * u_old + (1.0 - self._beta2) * g * g
          )
          m_hat = new_optim_state["m"][i] / (
              1.0 - tf.pow(self._beta1, t)
          )
          u_hat = new_optim_state["u"][i] / (
              1.0 - tf.pow(self._beta2, t)
          )
          new_x[i] = x[i] - self._lr * m_hat / (
              tf.sqrt(u_hat) + self._epsilon
          )
      return new_x, new_optim_state
  
imports: import warnings
  import numpy
  from six.moves import xrange
  import tensorflow
  import tensorflow_addons
  from cleverhans.attacks.attack import Attack
  from cleverhans.compat import reduce_mean, reduce_sum, reduce_max
  from cleverhans.model import Model
  from cleverhans import utils_tf
label_desc: Use image node_id 3 for calling the TensorAdam obj's underlying member method code with example usage: obj._apply_gradients(grads, x, optim_state) and returns: new_x,  new_optim_state