class_docstr: This module contains an implementation of the Over-the-Air Adversarial Flickering attack on video recognition
  networks.
  
  | Paper link: https://arxiv.org/abs/2002.05123
class_docstr_tok: ["This","module","contains","an","implementation","of","the","Over-the-Air","Adversarial","Flickering","attack","on","video","recognition","networks",".","|","Paper","link",":","https",":","\/\/arxiv.org\/abs\/2002.05123"]
docstr: Apply perturbation on examples.
  
  :param x: Current adversarial examples.
  :param grad: Current gradients.
  :param eps_step: Attack step size (input variation) at each iteration.
  :return: Adversarial examples.
docstr_tok: ["Apply","perturbation","on","examples",".",":","param","x",":","Current","adversarial","examples",".",":","param","grad",":","Current","gradients",".",":","param","eps_step",":","Attack","step","size","(","input","variation",")","at","each","iteration",".",":","return",":","Adversarial","examples","."]
code: def _apply_perturbation(
      self, x_adv: "torch.Tensor", grad: "torch.Tensor", eps_step: float
  ) -> "torch.Tensor":
      """
      Apply perturbation on examples.
  
      :param x: Current adversarial examples.
      :param grad: Current gradients.
      :param eps_step: Attack step size (input variation) at each iteration.
      :return: Adversarial examples.
      """
      import torch
  
      x_adv = x_adv - eps_step * torch.sign(grad)
  
      if self.estimator.clip_values is not None:
          clip_min, clip_max = self.estimator.clip_values
          x_adv = torch.max(
              torch.min(
                  x_adv,
                  torch.tensor(clip_max).to(self.estimator.device),
              ),
              torch.tensor(clip_min).to(self.estimator.device),
          )
  
      return x_adv
  
file_path: adversarial-robustness-toolbox/art/attacks/evasion/over_the_air_flickering/over_the_air_flickering_pytorch.py
imports: import logging
  from typing import Optional, TYPE_CHECKING
  import numpy
  from tqdm.auto import tqdm
  from art.config import ART_NUMPY_DTYPE
  from art.estimators.estimator import BaseEstimator
  from art.estimators.classification.classifier import ClassifierMixin, LossGradientsMixin
  from art.attacks.attack import EvasionAttack
  from art.utils import check_and_transform_label_format, get_labels_np_array
label_desc: Use image node_id 8 for calling the OverTheAirFlickeringPyTorch obj's underlying member method code with example usage: obj._apply_perturbation(x_adv, grad, eps_step) and returns: x_adv