class_docstr: Implementation of the Jacobian-based Saliency Map Attack (Papernot et al. 2016).
  
  | Paper link: https://arxiv.org/abs/1511.07528
class_docstr_tok: ["Implementation","of","the","Jacobian-based","Saliency","Map","Attack","(","Papernot","et","al",".","2016",")",".","|","Paper","link",":","https",":","\/\/arxiv.org\/abs\/1511.07528"]
docstr: Create a SaliencyMapMethod instance.
  
  :param classifier: A trained classifier.
  :param theta: Amount of Perturbation introduced to each modified feature per step (can be positive or negative).
  :param gamma: Maximum fraction of features being perturbed (between 0 and 1).
  :param batch_size: Size of the batch on which adversarial samples are generated.
  :param verbose: Show progress bars.
docstr_tok: ["Create","a","SaliencyMapMethod","instance",".",":","param","classifier",":","A","trained","classifier",".",":","param","theta",":","Amount","of","Perturbation","introduced","to","each","modified","feature","per","step","(","can","be","positive","or","negative",")",".",":","param","gamma",":","Maximum","fraction","of","features","being","perturbed","(","between","0","and","1",")",".",":","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",
      theta: float = 0.1,
      gamma: float = 1.0,
      batch_size: int = 1,
      verbose: bool = True,
  ) -> None:
      """
      Create a SaliencyMapMethod instance.
  
      :param classifier: A trained classifier.
      :param theta: Amount of Perturbation introduced to each modified feature per step (can be positive or negative).
      :param gamma: Maximum fraction of features being perturbed (between 0 and 1).
      :param batch_size: Size of the batch on which adversarial samples are generated.
      :param verbose: Show progress bars.
      """
      super().__init__(estimator=classifier)
      self.theta = theta
      self.gamma = gamma
      self.batch_size = batch_size
      self.verbose = verbose
      self._check_params()
  
file_path: adversarial-robustness-toolbox/art/attacks/evasion/saliency_map.py
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import logging
  from typing import Optional, Union, 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 check_and_transform_label_format
label_desc: Use image node_id 1 to create a new SaliencyMapMethod object from inherited base classes: EvasionAttack with example: obj = SaliencyMapMethod(classifier, theta, gamma, batch_size, verbose)