class_docstr: Optimizer for gradient-free attacks in https://arxiv.org/abs/1802.05666.
  
  Gradients estimates are computed using Simultaneous Perturbation Stochastic
  Approximation (SPSA), combined with the ADAM update rule.
code: def __init__(
      self,
      lr=0.01,
      delta=0.01,
      num_samples=128,
      num_iters=1,
      compare_to_analytic_grad=False,
  ):
      super(SPSAAdam, self).__init__(lr=lr)
      assert num_samples % 2 == 0, "number of samples must be even"
      self._delta = delta
      self._num_samples = (
          num_samples // 2
      )  # Since we mirror +/- delta later
      self._num_iters = num_iters
      self._compare_to_analytic_grad = compare_to_analytic_grad
  
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 1 to create a new SPSAAdam object from inherited base classes: TensorAdam with example: obj = SPSAAdam(lr, delta, num_samples, num_iters, compare_to_analytic_grad)