class_docstr: Implementation of the attack from Uyeong Jang et al. (2017).
  
  | Paper link: http://doi.acm.org/10.1145/3134600.3134635
class_docstr_tok: ["Implementation","of","the","attack","from","Uyeong","Jang","et","al",".","(","2017",")",".","|","Paper","link",":","http",":","\/\/doi.acm.org\/10.1145\/3134600.3134635"]
docstr: Create a NewtonFool attack instance.
  
  :param classifier: A trained classifier.
  :param max_iter: The maximum number of iterations.
  :param eta: The eta coefficient.
  :param batch_size: Size of the batch on which adversarial samples are generated.
  :param verbose: Show progress bars.
docstr_tok: ["Create","a","NewtonFool","attack","instance",".",":","param","classifier",":","A","trained","classifier",".",":","param","max_iter",":","The","maximum","number","of","iterations",".",":","param","eta",":","The","eta","coefficient",".",":","param","batch_size",":","Size","of","the","batch","on","which","adversarial","samples","are","generated",".",":","param","verbose",":","Show","progress","bars","."]
code: def __init__(
      self,
      classifier: "CLASSIFIER_CLASS_LOSS_GRADIENTS_TYPE",
      max_iter: int = 100,
      eta: float = 0.01,
      batch_size: int = 1,
      verbose: bool = True,
  ) -> None:
      """
      Create a NewtonFool attack instance.
  
      :param classifier: A trained classifier.
      :param max_iter: The maximum number of iterations.
      :param eta: The eta coefficient.
      :param batch_size: Size of the batch on which adversarial samples are generated.
      :param verbose: Show progress bars.
      """
      super().__init__(estimator=classifier)
      self.max_iter = max_iter
      self.eta = eta
      self.batch_size = batch_size
      self.verbose = verbose
      self._check_params()
  
file_path: adversarial-robustness-toolbox/art/attacks/evasion/newtonfool.py
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import logging
  from typing import Optional, TYPE_CHECKING
  import numpy
  from tqdm.auto import 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 ClassGradientsMixin
  from art.utils import to_categorical
label_desc: Use image node_id 1 to create a new NewtonFool object from inherited base classes: EvasionAttack with example: obj = NewtonFool(classifier, max_iter, eta, batch_size, verbose)