class_docstr: Implementation of the adversarial patch attack for square and rectangular images and videos.
  
  | Paper link: https://arxiv.org/abs/1712.09665
class_docstr_tok: ["Implementation","of","the","adversarial","patch","attack","for","square","and","rectangular","images","and","videos",".","|","Paper","link",":","https",":","\/\/arxiv.org\/abs\/1712.09665"]
code: def _check_params(self) -> None:
      if not isinstance(self._attack.rotation_max, (float, int)):
          raise ValueError(
              "The maximum rotation of the random patches must be of type float."
          )
      if (
          self._attack.rotation_max < 0
          or self._attack.rotation_max > 180.0
      ):
          raise ValueError(
              "The maximum rotation of the random patches must be between 0 and 180 degrees."
          )
  
      if not isinstance(self._attack.scale_min, float):
          raise ValueError(
              "The minimum scale of the random patched must be of type float."
          )
      if (
          self._attack.scale_min < 0
          or self._attack.scale_min >= self._attack.scale_max
      ):
          raise ValueError(
              "The minimum scale of the random patched must be greater than 0 and less than the maximum scaling."
          )
  
      if not isinstance(self._attack.scale_max, float):
          raise ValueError(
              "The maximum scale of the random patched must be of type float."
          )
      if self._attack.scale_max > 1:
          raise ValueError(
              "The maximum scale of the random patched must not be greater than 1."
          )
  
      if not isinstance(self._attack.learning_rate, float):
          raise ValueError("The learning rate must be of type float.")
  
      if not self._attack.learning_rate > 0.0:
          raise ValueError(
              "The learning rate must be greater than 0.0."
          )
  
      if not isinstance(self._attack.max_iter, int):
          raise ValueError(
              "The number of optimization steps must be of type int."
          )
      if not self._attack.max_iter > 0:
          raise ValueError(
              "The number of optimization steps must be greater than 0."
          )
  
      if not isinstance(self._attack.batch_size, int):
          raise ValueError("The batch size must be of type int.")
      if not self._attack.batch_size > 0:
          raise ValueError("The batch size must be greater than 0.")
  
      if not isinstance(self._attack.targeted, bool):
          raise ValueError(
              "The argument `targeted` has to be of type bool."
          )
  
      if not isinstance(self._attack.verbose, bool):
          raise ValueError(
              "The argument `verbose` has to be of type bool."
          )
  
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import logging
  from typing import Optional, Tuple, Union, TYPE_CHECKING
  import numpy
  from art.attacks.evasion.adversarial_patch.adversarial_patch_numpy import AdversarialPatchNumpy
  from art.attacks.evasion.adversarial_patch.adversarial_patch_tensorflow import AdversarialPatchTensorFlowV2
  from art.attacks.evasion.adversarial_patch.adversarial_patch_pytorch import AdversarialPatchPyTorch
  from art.estimators.estimator import BaseEstimator, NeuralNetworkMixin
  from art.estimators.classification.classifier import ClassifierMixin
  from art.estimators.classification import TensorFlowV2Classifier, PyTorchClassifier
  from art.attacks.attack import EvasionAttack
label_desc: Use image node_id 7 for calling the AdversarialPatch obj's underlying member method code with example usage: obj._check_params() without return types