class_docstr: This attack was originally implemented by Goodfellow et al. (2015) with the infinity norm (and is known as the "Fast
  Gradient Sign Method"). This implementation extends the attack to other norms, and is therefore called the Fast
  Gradient Method.
  
  | Paper link: https://arxiv.org/abs/1412.6572
class_docstr_tok: ["This","attack","was","originally","implemented","by","Goodfellow","et","al",".","(","2015",")","with","the","infinity","norm","(","and","is","known","as","the","``","Fast","Gradient","Sign","Method","''",")",".","This","implementation","extends","the","attack","to","other","norms",",","and","is","therefore","called","the","Fast","Gradient","Method",".","|","Paper","link",":","https",":","\/\/arxiv.org\/abs\/1412.6572"]
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 not isinstance(self.minimal, bool):
          raise ValueError("The flag `minimal` has to be of type bool.")
  
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import logging
  from typing import Optional, Union, TYPE_CHECKING
  import numpy
  from art.config import ART_NUMPY_DTYPE
  from art.attacks.attack import EvasionAttack
  from art.estimators.estimator import BaseEstimator, LossGradientsMixin
  from art.estimators.classification.classifier import ClassifierMixin
  from art.utils import compute_success, get_labels_np_array, random_sphere, projection, check_and_transform_label_format
  from art.summary_writer import SummaryWriter
label_desc: Use image node_id 5 for calling the FastGradientMethod obj's underlying member method code with example usage: obj._check_params() without return types