class_docstr: Optimizer for Tensors rather than tf.Variables.
  
  TensorOptimizers implement optimizers where the values being optimized
  are ordinary Tensors, rather than Variables. TF Variables can have strange
  behaviors when being assigned multiple times within a single sess.run()
  call, particularly in Distributed TF, so this avoids thinking about those
  issues. These are helper classes for the `projected_optimization`
  method. Apart from not using Variables, they follow an interface very
  similar to tf.Optimizer.
docstr: Analogous to tf.Optimizer.minimize
  
  :param loss_fn: tf Tensor, representing the loss to minimize
  :param x: list of Tensor, analogous to tf.Optimizer's var_list
  :param optim_state: A possibly nested dict, containing any optimizer state.
  
  Returns:
    new_x: list of Tensor, updated version of `x`
    new_optim_state: dict, updated version of `optim_state`
docstr_tok: ["Analogous","to","tf.Optimizer.minimize",":","param","loss_fn",":","tf","Tensor",",","representing","the","loss","to","minimize",":","param","x",":","list","of","Tensor",",","analogous","to","tf.Optimizer","'s","var_list",":","param","optim_state",":","A","possibly","nested","dict",",","containing","any","optimizer","state",".","Returns",":","new_x",":","list","of","Tensor",",","updated","version","of","`","x","`","new_optim_state",":","dict",",","updated","version","of","`","optim_state","`"]
code: def minimize(self, loss_fn, x, optim_state):
      """
      Analogous to tf.Optimizer.minimize
  
      :param loss_fn: tf Tensor, representing the loss to minimize
      :param x: list of Tensor, analogous to tf.Optimizer's var_list
      :param optim_state: A possibly nested dict, containing any optimizer state.
  
      Returns:
        new_x: list of Tensor, updated version of `x`
        new_optim_state: dict, updated version of `optim_state`
      """
      grads = self._compute_gradients(loss_fn, x, optim_state)
      return self._apply_gradients(grads, x, 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 TensorOptimizer obj's underlying member method code with example usage: obj.minimize(loss_fn, x, optim_state) and returns: self