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",")","."]
docstr: Initialize t, m, and u
docstr_tok: ["Initialize","t",",","m",",","and","u"]
code: def init_state(self, x):
      """Initialize t, m, and u"""
      optim_state = {
          "t": 0.0,
          "m": [tf.zeros_like(v) for v in x],
          "u": [tf.zeros_like(v) for v in x],
      }
      return optim_state
  
file_path: cleverhans/cleverhans/tf2/attacks/spsa.py
imports: import tensorflow
label_desc: Use image node_id 5 for calling the SPSAAdam obj's underlying member method code with example usage: obj.init_state(x) and returns: optim_state