class_docstr: This attack was originally proposed by Carlini and Wagner. It is an
  iterative attack that finds adversarial examples on many defenses that
  are robust to other attacks.
  Paper link: https://arxiv.org/abs/1608.04644
  
  At a high level, this attack is an iterative attack using Adam and
  a specially-chosen loss function to find adversarial examples with
  lower distortion than other attacks. This comes at the cost of speed,
  as this attack is often much slower than others.
  
  :param model: cleverhans.model.Model
  :param sess: tf.Session
  :param dtypestr: dtype of the data
  :param kwargs: passed through to super constructor
class_docstr_tok: ["This","attack","was","originally","proposed","by","Carlini","and","Wagner",".","It","is","an","iterative","attack","that","finds","adversarial","examples","on","many","defenses","that","are","robust","to","other","attacks",".","Paper","link",":","https",":","\/\/arxiv.org\/abs\/1608.04644","At","a","high","level",",","this","attack","is","an","iterative","attack","using","Adam","and","a","specially-chosen","loss","function","to","find","adversarial","examples","with","lower","distortion","than","other","attacks",".","This","comes","at","the","cost","of","speed",",","as","this","attack","is","often","much","slower","than","others",".",":","param","model",":","cleverhans.model.Model",":","param","sess",":","tf.Session",":","param","dtypestr",":","dtype","of","the","data",":","param","kwargs",":","passed","through","to","super","constructor"]
docstr: Note: the model parameter should be an instance of the
  cleverhans.model.Model abstraction provided by CleverHans.
docstr_tok: ["Note",":","the","model","parameter","should","be","an","instance","of","the","cleverhans.model.Model","abstraction","provided","by","CleverHans","."]
code: def __init__(self, model, sess, dtypestr="float32", **kwargs):
      """
      Note: the model parameter should be an instance of the
      cleverhans.model.Model abstraction provided by CleverHans.
      """
      if not isinstance(model, Model):
          wrapper_warning_logits()
          model = CallableModelWrapper(model, "logits")
  
      super(CarliniWagnerL2, self).__init__(
          model, sess, dtypestr, **kwargs
      )
  
      self.feedable_kwargs = ("y", "y_target")
  
      self.structural_kwargs = [
          "batch_size",
          "confidence",
          "targeted",
          "learning_rate",
          "binary_search_steps",
          "max_iterations",
          "abort_early",
          "initial_const",
          "clip_min",
          "clip_max",
      ]
  
file_path: cleverhans/cleverhans_v3.1.0/cleverhans/attacks/carlini_wagner_l2.py
imports: import logging
  import numpy
  import tensorflow
  from cleverhans.attacks.attack import Attack
  from cleverhans.compat import reduce_sum, reduce_max
  from cleverhans.model import CallableModelWrapper, Model, wrapper_warning_logits
  from cleverhans import utils
label_desc: Use image node_id 1 to create a new CarliniWagnerL2 object from inherited base classes: Attack with example: obj = CarliniWagnerL2(model, sess, dtypestr)