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: Create an instance of the :class:`.OverTheAirFlickeringPyTorch`.
  
  :param classifier: A trained classifier.
  :param eps_step: The step size per iteration.
  :param max_iter: The number of iterations.
  :param beta_0: Weighting of the sum of all regularisation terms corresponding to `lambda` in the original paper.
  :param beta_1: Weighting of thickness regularisation.
  :param beta_2: Weighting of roughness regularisation.
  :param loss_margin: The loss margin.
  :param batch_size: Batch size.
  :param start_frame_index: The first frame to be perturbed.
  :param num_frames: The number of frames to be perturbed.
  :param round_samples: Granularity of the input values to be enforced if > 0.0.
  :param targeted: Indicates whether the attack is targeted (True) or untargeted (False).
  :param verbose: Show progress bars.
docstr_tok: ["Create","an","instance","of","the",":","class",":","`",".OverTheAirFlickeringPyTorch","`",".",":","param","classifier",":","A","trained","classifier",".",":","param","eps_step",":","The","step","size","per","iteration",".",":","param","max_iter",":","The","number","of","iterations",".",":","param","beta_0",":","Weighting","of","the","sum","of","all","regularisation","terms","corresponding","to","`","lambda","`","in","the","original","paper",".",":","param","beta_1",":","Weighting","of","thickness","regularisation",".",":","param","beta_2",":","Weighting","of","roughness","regularisation",".",":","param","loss_margin",":","The","loss","margin",".",":","param","batch_size",":","Batch","size",".",":","param","start_frame_index",":","The","first","frame","to","be","perturbed",".",":","param","num_frames",":","The","number","of","frames","to","be","perturbed",".",":","param","round_samples",":","Granularity","of","the","input","values","to","be","enforced","if",">","0.0.",":","param","targeted",":","Indicates","whether","the","attack","is","targeted","(","True",")","or","untargeted","(","False",")",".",":","param","verbose",":","Show","progress","bars","."]
code: def __init__(
      self,
      classifier: "PyTorchClassifier",
      eps_step: float = 0.01,
      max_iter: int = 30,
      beta_0: float = 1.0,
      beta_1: float = 0.5,
      beta_2: float = 0.5,
      loss_margin: float = 0.05,
      batch_size: int = 1,
      start_frame_index: int = 0,
      num_frames: Optional[int] = None,
      round_samples: float = 0.0,
      targeted: bool = False,
      verbose: bool = True,
  ):
      """
      Create an instance of the :class:`.OverTheAirFlickeringPyTorch`.
  
      :param classifier: A trained classifier.
      :param eps_step: The step size per iteration.
      :param max_iter: The number of iterations.
      :param beta_0: Weighting of the sum of all regularisation terms corresponding to `lambda` in the original paper.
      :param beta_1: Weighting of thickness regularisation.
      :param beta_2: Weighting of roughness regularisation.
      :param loss_margin: The loss margin.
      :param batch_size: Batch size.
      :param start_frame_index: The first frame to be perturbed.
      :param num_frames: The number of frames to be perturbed.
      :param round_samples: Granularity of the input values to be enforced if > 0.0.
      :param targeted: Indicates whether the attack is targeted (True) or untargeted (False).
      :param verbose: Show progress bars.
      """
      super().__init__(estimator=classifier)
  
      self.eps_step = eps_step
      self.max_iter = max_iter
      self.beta_0 = beta_0
      self.beta_1 = beta_1
      self.beta_2 = beta_2
      self.loss_margin = loss_margin
      self.batch_size = batch_size
      self.start_frame_index = start_frame_index
      self.num_frames = num_frames
      self.round_samples = round_samples
      self.end_frame_index = (
          self.start_frame_index + self.num_frames
          if self.num_frames is not None
          else self.num_frames
      )
      self._targeted = targeted
      self.verbose = verbose
      self._check_params()
  
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 1 to create a new OverTheAirFlickeringPyTorch object from inherited base classes: EvasionAttack with example: obj = OverTheAirFlickeringPyTorch(classifier, eps_step, max_iter, beta_0, beta_1, beta_2, loss_margin, batch_size, start_frame_index, num_frames, round_samples, targeted, verbose)