class_docstr: Implementation of the boundary attack from Brendel et al. (2018). This is a powerful black-box attack that
  only requires final class prediction.
  
  | Paper link: https://arxiv.org/abs/1712.04248
class_docstr_tok: ["Implementation","of","the","boundary","attack","from","Brendel","et","al",".","(","2018",")",".","This","is","a","powerful","black-box","attack","that","only","requires","final","class","prediction",".","|","Paper","link",":","https",":","\/\/arxiv.org\/abs\/1712.04248"]
docstr: Create a boundary attack instance.
  
  :param estimator: A trained classifier.
  :param batch_size: The size of the batch used by the estimator during inference.
  :param targeted: Should the attack target one specific class.
  :param delta: Initial step size for the orthogonal step.
  :param epsilon: Initial step size for the step towards the target.
  :param step_adapt: Factor by which the step sizes are multiplied or divided, must be in the range (0, 1).
  :param max_iter: Maximum number of iterations.
  :param num_trial: Maximum number of trials per iteration.
  :param sample_size: Number of samples per trial.
  :param init_size: Maximum number of trials for initial generation of adversarial examples.
  :param min_epsilon: Stop attack if perturbation is smaller than `min_epsilon`.
  :param verbose: Show progress bars.
docstr_tok: ["Create","a","boundary","attack","instance",".",":","param","estimator",":","A","trained","classifier",".",":","param","batch_size",":","The","size","of","the","batch","used","by","the","estimator","during","inference",".",":","param","targeted",":","Should","the","attack","target","one","specific","class",".",":","param","delta",":","Initial","step","size","for","the","orthogonal","step",".",":","param","epsilon",":","Initial","step","size","for","the","step","towards","the","target",".",":","param","step_adapt",":","Factor","by","which","the","step","sizes","are","multiplied","or","divided",",","must","be","in","the","range","(","0",",","1",")",".",":","param","max_iter",":","Maximum","number","of","iterations",".",":","param","num_trial",":","Maximum","number","of","trials","per","iteration",".",":","param","sample_size",":","Number","of","samples","per","trial",".",":","param","init_size",":","Maximum","number","of","trials","for","initial","generation","of","adversarial","examples",".",":","param","min_epsilon",":","Stop","attack","if","perturbation","is","smaller","than","`","min_epsilon","`",".",":","param","verbose",":","Show","progress","bars","."]
code: def __init__(
      self,
      estimator: "CLASSIFIER_TYPE",
      batch_size: int = 64,
      targeted: bool = True,
      delta: float = 0.01,
      epsilon: float = 0.01,
      step_adapt: float = 0.667,
      max_iter: int = 5000,
      num_trial: int = 25,
      sample_size: int = 20,
      init_size: int = 100,
      min_epsilon: float = 0.0,
      verbose: bool = True,
  ) -> None:
      """
      Create a boundary attack instance.
  
      :param estimator: A trained classifier.
      :param batch_size: The size of the batch used by the estimator during inference.
      :param targeted: Should the attack target one specific class.
      :param delta: Initial step size for the orthogonal step.
      :param epsilon: Initial step size for the step towards the target.
      :param step_adapt: Factor by which the step sizes are multiplied or divided, must be in the range (0, 1).
      :param max_iter: Maximum number of iterations.
      :param num_trial: Maximum number of trials per iteration.
      :param sample_size: Number of samples per trial.
      :param init_size: Maximum number of trials for initial generation of adversarial examples.
      :param min_epsilon: Stop attack if perturbation is smaller than `min_epsilon`.
      :param verbose: Show progress bars.
      """
      super().__init__(estimator=estimator)
  
      self._targeted = targeted
      self.delta = delta
      self.epsilon = epsilon
      self.step_adapt = step_adapt
      self.max_iter = max_iter
      self.num_trial = num_trial
      self.sample_size = sample_size
      self.init_size = init_size
      self.min_epsilon = min_epsilon
      self.batch_size = batch_size
      self.verbose = verbose
      self._check_params()
  
      self.curr_adv: Optional[np.ndarray] = None
  
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import logging
  from typing import List, Optional, Tuple, TYPE_CHECKING
  import numpy
  from tqdm.auto import tqdm, trange
  from art.attacks.attack import EvasionAttack
  from art.config import ART_NUMPY_DTYPE
  from art.estimators.estimator import BaseEstimator
  from art.estimators.classification.classifier import ClassifierMixin
  from art.utils import compute_success, to_categorical, check_and_transform_label_format, get_labels_np_array
label_desc: Use image node_id 1 to create a new BoundaryAttack object from inherited base classes: EvasionAttack with example: obj = BoundaryAttack(estimator, batch_size, targeted, delta, epsilon, step_adapt, max_iter, num_trial, sample_size, init_size, min_epsilon, verbose)