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 (https://arxiv.org/abs/1412.6980).
class_docstr_tok: ["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","(","https",":","\/\/arxiv.org\/abs\/1412.6980",")","."]
code: def _get_delta(self, x, delta):
      x_shape = x.get_shape().as_list()
      delta_x = delta * tf.sign(
          tf.random.uniform(
              [self._num_samples] + x_shape[1:],
              minval=-1.0,
              maxval=1.0,
              dtype=tf_dtype,
          )
      )
      return delta_x
  
file_path: cleverhans/cleverhans/tf2/attacks/spsa.py
imports: import tensorflow
label_desc: Use image node_id 2 for calling the SPSAAdam obj's underlying member method code with example usage: obj._get_delta(x, delta) and returns: delta_x