class_docstr: Implements ``Wasserstein Adversarial Examples via Projected Sinkhorn Iterations`` as evasion attack.
  
  | Paper link: https://arxiv.org/abs/1902.07906
class_docstr_tok: ["Implements","``","Wasserstein","Adversarial","Examples","via","Projected","Sinkhorn","Iterations","``","as","evasion","attack",".","|","Paper","link",":","https",":","\/\/arxiv.org\/abs\/1902.07906"]
code: def _check_params(self) -> None:
      if not isinstance(self.targeted, bool):
          raise ValueError(
              "The flag `targeted` has to be of type bool."
          )
  
      if self.regularization <= 0:
          raise ValueError(
              "The entropy regularization has to be greater than 0."
          )
  
      if not isinstance(self.p, int):
          raise TypeError(
              "The p-wasserstein has to be of type integer."
          )
  
      if self.p < 1:
          raise ValueError(
              "The p-wasserstein must be larger or equal to 1."
          )
  
      if not isinstance(self.kernel_size, int):
          raise TypeError("The kernel size has to be of type integer.")
  
      if self.kernel_size % 2 != 1:
          raise ValueError("Need odd kernel size.")
  
      # Check if order of the norm is acceptable given current implementation
      if self.norm not in ["inf", "1", "2", "wasserstein"]:
          raise ValueError(
              "Norm order must be either `inf`, `1`, `2` or `wasserstein`."
          )
  
      # Check if order of the ball is acceptable given current implementation
      if self.ball not in ["inf", "1", "2", "wasserstein"]:
          raise ValueError(
              "Ball order must be either `inf`, `1`, `2` or `wasserstein`."
          )
  
      if self.eps <= 0:
          raise ValueError(
              "The perturbation size `eps` has to be positive."
          )
  
      if self.eps_step <= 0:
          raise ValueError(
              "The perturbation step-size `eps_step` has to be positive."
          )
  
      if self.norm == "inf" and self.eps_step > self.eps:
          raise ValueError(
              "The iteration step `eps_step` has to be smaller than or equal to the total attack budget `eps`."
          )
  
      if self.eps_iter <= 0:
          raise ValueError(
              "The number of epsilon iterations `eps_iter` has to be a positive integer."
          )
  
      if self.eps_factor <= 1:
          raise ValueError("The epsilon factor must be larger than 1.")
  
      if self.max_iter <= 0:
          raise ValueError(
              "The number of iterations `max_iter` has to be a positive integer."
          )
  
      if self.conjugate_sinkhorn_max_iter <= 0:
          raise ValueError(
              "The number of iterations `conjugate_sinkhorn_max_iter` has to be a positive integer."
          )
  
      if self.projected_sinkhorn_max_iter <= 0:
          raise ValueError(
              "The number of iterations `projected_sinkhorn_max_iter` has to be a positive integer."
          )
  
      if self.batch_size <= 0:
          raise ValueError(
              "The batch size `batch_size` has to be positive."
          )
  
      if not isinstance(self.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, TYPE_CHECKING
  import numpy
  from scipy.special import lambertw
  from tqdm.auto import trange
  from art.config import ART_NUMPY_DTYPE
  from art.estimators.estimator import BaseEstimator, LossGradientsMixin
  from art.estimators.classification.classifier import ClassifierMixin
  from art.attacks.attack import EvasionAttack
  from art.utils import get_labels_np_array, check_and_transform_label_format
label_desc: Use image node_id 15 for calling the Wasserstein obj's underlying member method code with example usage: obj._check_params() without return types