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: Rounds the input to the correct level of granularity. Useful to ensure data passed to classifier can be
  represented in the correct domain, e.g., [0, 255] integers verses [0,1] or [0, 255] floating points.
  
  :param x: Sample input with shape as expected by the model.
  :return: Clipped and rounded inputs.
docstr_tok: ["Rounds","the","input","to","the","correct","level","of","granularity",".","Useful","to","ensure","data","passed","to","classifier","can","be","represented","in","the","correct","domain",",","e.g.",",","[","0",",","255","]","integers","verses","[","0,1","]","or","[","0",",","255","]","floating","points",".",":","param","x",":","Sample","input","with","shape","as","expected","by","the","model",".",":","return",":","Clipped","and","rounded","inputs","."]
code: def _clip_and_round_pytorch(
      self, x: "torch.Tensor"
  ) -> "torch.Tensor":
      """
      Rounds the input to the correct level of granularity. Useful to ensure data passed to classifier can be
      represented in the correct domain, e.g., [0, 255] integers verses [0,1] or [0, 255] floating points.
  
      :param x: Sample input with shape as expected by the model.
      :return: Clipped and rounded inputs.
      """
      import torch
  
      if self.estimator.clip_values is not None:
          x = torch.clamp(
              x,
              self.estimator.clip_values[0],
              self.estimator.clip_values[1],
          )
  
      if self.round_samples != 0.0:
          x = torch.round(x / self.round_samples) * self.round_samples
  
      return x
  
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 7 for calling the OverTheAirFlickeringPyTorch obj's underlying member method code with example usage: obj._clip_and_round_pytorch(x) and returns: x