class_docstr: The Projected Gradient Descent attack is an iterative method in which, after each iteration, the perturbation is
  projected on an lp-ball of specified radius (in addition to clipping the values of the adversarial sample so that it
  lies in the permitted data range). This is the attack proposed by Madry et al. for adversarial training.
  
  | Paper link: https://arxiv.org/abs/1706.06083
class_docstr_tok: ["The","Projected","Gradient","Descent","attack","is","an","iterative","method","in","which",",","after","each","iteration",",","the","perturbation","is","projected","on","an","lp-ball","of","specified","radius","(","in","addition","to","clipping","the","values","of","the","adversarial","sample","so","that","it","lies","in","the","permitted","data","range",")",".","This","is","the","attack","proposed","by","Madry","et","al",".","for","adversarial","training",".","|","Paper","link",":","https",":","\/\/arxiv.org\/abs\/1706.06083"]
code: def _check_params(self) -> None:
      if self.norm not in [1, 2, np.inf, "inf"]:
          raise ValueError(
              'Norm order must be either 1, 2, `np.inf` or "inf".'
          )
  
      if not (
          isinstance(self.eps, (int, float))
          and isinstance(self.eps_step, (int, float))
          or isinstance(self.eps, np.ndarray)
          and isinstance(self.eps_step, np.ndarray)
      ):
          raise TypeError(
              "The perturbation size `eps` and the perturbation step-size `eps_step` must have the same type of `int`"
              ", `float`, or `np.ndarray`."
          )
  
      if isinstance(self.eps, (int, float)):
          if self.eps < 0:
              raise ValueError(
                  "The perturbation size `eps` has to be nonnegative."
              )
      else:
          if (self.eps < 0).any():
              raise ValueError(
                  "The perturbation size `eps` has to be nonnegative."
              )
  
      if isinstance(self.eps_step, (int, float)):
          if self.eps_step <= 0:
              raise ValueError(
                  "The perturbation step-size `eps_step` has to be positive."
              )
      else:
          if (self.eps_step <= 0).any():
              raise ValueError(
                  "The perturbation step-size `eps_step` has to be positive."
              )
  
      if isinstance(self.eps, np.ndarray) and isinstance(
          self.eps_step, np.ndarray
      ):
          if self.eps.shape != self.eps_step.shape:
              raise ValueError(
                  "The perturbation size `eps` and the perturbation step-size `eps_step` must have the same shape."
              )
  
      if not isinstance(self.targeted, bool):
          raise ValueError(
              "The flag `targeted` has to be of type bool."
          )
  
      if not isinstance(self.num_random_init, int):
          raise TypeError(
              "The number of random initialisations has to be of type integer."
          )
  
      if self.num_random_init < 0:
          raise ValueError(
              "The number of random initialisations `random_init` has to be greater than or equal to 0."
          )
  
      if self.batch_size <= 0:
          raise ValueError(
              "The batch size `batch_size` has to be positive."
          )
  
      if self.max_iter < 0:
          raise ValueError(
              "The number of iterations `max_iter` has to be a nonnegative integer."
          )
  
      if not isinstance(self.verbose, bool):
          raise ValueError("The verbose has to be a Boolean.")
  
file_path: adversarial-robustness-toolbox/art/attacks/evasion/projected_gradient_descent/projected_gradient_descent.py
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import logging
  from typing import Optional, Union, TYPE_CHECKING
  import numpy
  from art.estimators.classification.pytorch import PyTorchClassifier
  from art.estimators.classification.tensorflow import TensorFlowV2Classifier
  from art.estimators.estimator import BaseEstimator, LossGradientsMixin
  from art.attacks.attack import EvasionAttack
  from art.attacks.evasion.projected_gradient_descent.projected_gradient_descent_numpy import ProjectedGradientDescentNumpy
  from art.attacks.evasion.projected_gradient_descent.projected_gradient_descent_pytorch import ProjectedGradientDescentPyTorch
  from art.attacks.evasion.projected_gradient_descent.projected_gradient_descent_tensorflow_v2 import ProjectedGradientDescentTensorFlowV2
  from art.summary_writer import SummaryWriter
label_desc: Use image node_id 5 for calling the ProjectedGradientDescent obj's underlying member method code with example usage: obj._check_params() without return types