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"]
code: def _compute_frames_to_perturb(
      self,
      x_adv: np.ndarray,
      targets: np.ndarray,
      disregard: Optional[np.ndarray] = None,
  ) -> np.ndarray:
      saliency_score = self.estimator.loss_gradient(x_adv, targets)
      saliency_score = np.swapaxes(saliency_score, 1, self.frame_index)
      saliency_score = saliency_score.reshape(
          (
              saliency_score.shape[:2]
              + (np.prod(saliency_score.shape[2:]),)
          )
      )
      saliency_score = np.mean(np.abs(saliency_score), axis=2)
  
      if disregard is not None:
          saliency_score += disregard
  
      return np.argsort(-saliency_score, axis=1)
  
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 4 for calling the FrameSaliencyAttack obj's underlying member method code with example usage: obj._compute_frames_to_perturb(x_adv, targets, disregard) and returns: np