class_docstr: Implementation of the attack framework proposed by Inkawhich et al. (2018). Prioritizes the frame of a sequential
  input to be adversarially perturbed based on the saliency score of each frame.
  
  | Paper link: https://arxiv.org/abs/1811.11875
class_docstr_tok: ["Implementation","of","the","attack","framework","proposed","by","Inkawhich","et","al",".","(","2018",")",".","Prioritizes","the","frame","of","a","sequential","input","to","be","adversarially","perturbed","based","on","the","saliency","score","of","each","frame",".","|","Paper","link",":","https",":","\/\/arxiv.org\/abs\/1811.11875"]
docstr: :param classifier: A trained classifier.
  :param attacker: An adversarial evasion attacker which supports masking. Currently supported:
                   ProjectedGradientDescent, BasicIterativeMethod, FastGradientMethod.
  :param method: Specifies which method to use: "iterative_saliency" (adds perturbation iteratively to frame
                 with highest saliency score until attack is successful), "iterative_saliency_refresh" (updates
                 perturbation after each iteration), "one_shot" (adds all perturbations at once, i.e. defaults to
                 original attack).
  :param frame_index: Index of the axis in input (feature) array `x` representing the frame dimension.
  :param batch_size: Size of the batch on which adversarial samples are generated.
  :param verbose: Show progress bars.
docstr_tok: [":","param","classifier",":","A","trained","classifier",".",":","param","attacker",":","An","adversarial","evasion","attacker","which","supports","masking",".","Currently","supported",":","ProjectedGradientDescent",",","BasicIterativeMethod",",","FastGradientMethod",".",":","param","method",":","Specifies","which","method","to","use",":","``","iterative_saliency","''","(","adds","perturbation","iteratively","to","frame","with","highest","saliency","score","until","attack","is","successful",")",",","``","iterative_saliency_refresh","''","(","updates","perturbation","after","each","iteration",")",",","``","one_shot","''","(","adds","all","perturbations","at","once",",","i.e",".","defaults","to","original","attack",")",".",":","param","frame_index",":","Index","of","the","axis","in","input","(","feature",")","array","`","x","`","representing","the","frame","dimension",".",":","param","batch_size",":","Size","of","the","batch","on","which","adversarial","samples","are","generated",".",":","param","verbose",":","Show","progress","bars","."]
code: def __init__(
      self,
      classifier: "CLASSIFIER_NEURALNETWORK_TYPE",
      attacker: EvasionAttack,
      method: str = "iterative_saliency",
      frame_index: int = 1,
      batch_size: int = 1,
      verbose: bool = True,
  ):
      """
      :param classifier: A trained classifier.
      :param attacker: An adversarial evasion attacker which supports masking. Currently supported:
                       ProjectedGradientDescent, BasicIterativeMethod, FastGradientMethod.
      :param method: Specifies which method to use: "iterative_saliency" (adds perturbation iteratively to frame
                     with highest saliency score until attack is successful), "iterative_saliency_refresh" (updates
                     perturbation after each iteration), "one_shot" (adds all perturbations at once, i.e. defaults to
                     original attack).
      :param frame_index: Index of the axis in input (feature) array `x` representing the frame dimension.
      :param batch_size: Size of the batch on which adversarial samples are generated.
      :param verbose: Show progress bars.
      """
      super().__init__(estimator=classifier)
  
      self.attacker = attacker
      self.method = method
      self.frame_index = frame_index
      self.batch_size = batch_size
      self.verbose = verbose
      self._check_params()
  
file_path: adversarial-robustness-toolbox/art/attacks/evasion/frame_saliency.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.config import ART_NUMPY_DTYPE
  from art.estimators.estimator import BaseEstimator, NeuralNetworkMixin
  from art.estimators.classification.classifier import ClassGradientsMixin
  from art.attacks.attack import EvasionAttack
  from art.utils import compute_success_array, get_labels_np_array, check_and_transform_label_format
label_desc: Use image node_id 1 to create a new FrameSaliencyAttack object from inherited base classes: EvasionAttack with example: obj = FrameSaliencyAttack(classifier, attacker, method, frame_index, batch_size, verbose)