class_docstr: Implementation of the Carlini & Wagner L2 Attack. [#Carl16]_
  
  Args:
      binary_search_steps : Number of steps to perform in the binary search
          over the const c.
      steps : Number of optimization steps within each binary search step.
      stepsize : Stepsize to update the examples.
      confidence : Confidence required for an example to be marked as adversarial.
          Controls the gap between example and decision boundary.
      initial_const : Initial value of the const c with which the binary search starts.
      abort_early : Stop inner search as soons as an adversarial example has been found.
          Does not affect the binary search over the const c.
  
  References:
      .. [#Carl16] Nicholas Carlini, David Wagner, "Towards evaluating the robustness of
          neural networks. In 2017 ieee symposium on security and privacy"
          https://arxiv.org/abs/1608.04644
class_docstr_tok: ["Implementation","of","the","Carlini","&","Wagner","L2","Attack",".","[","#","Carl16","]","_","Args",":","binary_search_steps",":","Number","of","steps","to","perform","in","the","binary","search","over","the","const","c.","steps",":","Number","of","optimization","steps","within","each","binary","search","step",".","stepsize",":","Stepsize","to","update","the","examples",".","confidence",":","Confidence","required","for","an","example","to","be","marked","as","adversarial",".","Controls","the","gap","between","example","and","decision","boundary",".","initial_const",":","Initial","value","of","the","const","c","with","which","the","binary","search","starts",".","abort_early",":","Stop","inner","search","as","soons","as","an","adversarial","example","has","been","found",".","Does","not","affect","the","binary","search","over","the","const","c.","References",":","..","[","#","Carl16","]","Nicholas","Carlini",",","David","Wagner",",","``","Towards","evaluating","the","robustness","of","neural","networks",".","In","2017","ieee","symposium","on","security","and","privacy","''","https",":","\/\/arxiv.org\/abs\/1608.04644"]
code: def __init__(
      self,
      binary_search_steps: int = 9,
      steps: int = 10000,
      stepsize: float = 1e-2,
      confidence: float = 0,
      initial_const: float = 1e-3,
      abort_early: bool = True,
  ):
      self.binary_search_steps = binary_search_steps
      self.steps = steps
      self.stepsize = stepsize
      self.confidence = confidence
      self.initial_const = initial_const
      self.abort_early = abort_early
  
imports: from typing import Union, Tuple, Any, Optional
  from functools import partial
  import numpy
  import eagerpy
  from ..devutils import flatten
  from ..devutils import atleast_kd
  from ..types import Bounds
  from ..models import Model
  from ..distances import l2
  from ..criteria import Misclassification
  from ..criteria import TargetedMisclassification
  from .base import MinimizationAttack
  from .base import T
  from .base import get_criterion
  from .base import raise_if_kwargs
  from .base import verify_input_bounds
  from .gradient_descent_base import AdamOptimizer
label_desc: Use image node_id 1 to create a new L2CarliniWagnerAttack object from inherited base classes: MinimizationAttack with example: obj = L2CarliniWagnerAttack(binary_search_steps, steps, stepsize, confidence, initial_const, abort_early)