class_docstr: Implementation of the DPatch attack.
  
  | Paper link: https://arxiv.org/abs/1806.02299v4
class_docstr_tok: ["Implementation","of","the","DPatch","attack",".","|","Paper","link",":","https",":","\/\/arxiv.org\/abs\/1806.02299v4"]
code: def _check_params(self) -> None:
      if not isinstance(self.patch_shape, (tuple, list)) or not all(
          isinstance(s, int) for s in self.patch_shape
      ):
          raise ValueError(
              "The patch shape must be either a tuple or list of integers."
          )
      if len(self.patch_shape) != 3:
          raise ValueError("The length of patch shape must be 3.")
  
      if not isinstance(self.learning_rate, float):
          raise ValueError("The learning rate must be of type float.")
      if self.learning_rate <= 0.0:
          raise ValueError(
              "The learning rate must be greater than 0.0."
          )
  
      if not isinstance(self.max_iter, int):
          raise ValueError(
              "The number of optimization steps must be of type int."
          )
      if self.max_iter <= 0:
          raise ValueError(
              "The number of optimization steps must be greater than 0."
          )
  
      if not isinstance(self.batch_size, int):
          raise ValueError("The batch size must be of type int.")
      if self.batch_size <= 0:
          raise ValueError("The batch size must be greater than 0.")
  
      if not isinstance(self.verbose, bool):
          raise ValueError(
              "The argument `verbose` has to be of type bool."
          )
  
file_path: adversarial-robustness-toolbox/art/attacks/evasion/dpatch.py
imports: import logging
  import math
  import random
  from typing import Dict, List, Optional, Tuple, Union, TYPE_CHECKING
  import numpy
  from tqdm.auto import trange
  from art.attacks.attack import EvasionAttack
  from art.estimators.estimator import BaseEstimator, LossGradientsMixin
  from art.estimators.object_detection.object_detector import ObjectDetectorMixin
  from art import config
label_desc: Use image node_id 5 for calling the DPatch obj's underlying member method code with example usage: obj._check_params() without return types