class_docstr: A unittest class for testing Adversarial Patch attack.
class_docstr_tok: ["A","unittest","class","for","testing","Adversarial","Patch","attack","."]
code: def test_check_params(self):
      ptc = get_image_classifier_pt(from_logits=True)
  
      krc = get_image_classifier_kr(from_logits=True)
  
      # AdversarialPatch
  
      with self.assertRaises(ValueError):
          _ = AdversarialPatch(ptc, rotation_max="1")
      with self.assertRaises(ValueError):
          _ = AdversarialPatch(ptc, rotation_max=-1)
  
      with self.assertRaises(ValueError):
          _ = AdversarialPatch(ptc, scale_min="1")
      with self.assertRaises(ValueError):
          _ = AdversarialPatch(ptc, scale_min=-1.0)
  
      with self.assertRaises(ValueError):
          _ = AdversarialPatch(ptc, scale_max=1)
      with self.assertRaises(ValueError):
          _ = AdversarialPatch(ptc, scale_max=2.0)
  
      with self.assertRaises(ValueError):
          _ = AdversarialPatch(ptc, learning_rate=1)
      with self.assertRaises(ValueError):
          _ = AdversarialPatch(krc, learning_rate=-1.0)
  
      with self.assertRaises(ValueError):
          _ = AdversarialPatch(ptc, max_iter=1.0)
      with self.assertRaises(ValueError):
          _ = AdversarialPatch(ptc, max_iter=-1)
  
      with self.assertRaises(ValueError):
          _ = AdversarialPatch(ptc, batch_size=1.0)
      with self.assertRaises(ValueError):
          _ = AdversarialPatch(ptc, batch_size=-1)
  
      with self.assertRaises(ValueError):
          _ = AdversarialPatch(ptc, verbose="true")
  
      # AdversarialPatchPyTorch
  
      with self.assertRaises(ValueError):
          _ = AdversarialPatchPyTorch(ptc, distortion_scale_max="1")
  
      with self.assertRaises(ValueError):
          _ = AdversarialPatchPyTorch(ptc, patch_type="triangle")
  
      # AdversarialPatchNumpy
  
      with self.assertRaises(ValueError):
          _ = AdversarialPatchNumpy(ptc, rotation_max="1")
      with self.assertRaises(ValueError):
          _ = AdversarialPatchNumpy(ptc, rotation_max=-1)
  
      with self.assertRaises(ValueError):
          _ = AdversarialPatchNumpy(ptc, scale_min="1")
      with self.assertRaises(ValueError):
          _ = AdversarialPatchNumpy(ptc, scale_min=-1.0)
  
      with self.assertRaises(ValueError):
          _ = AdversarialPatchNumpy(ptc, scale_max=1)
      with self.assertRaises(ValueError):
          _ = AdversarialPatchNumpy(ptc, scale_max=2.0)
  
      with self.assertRaises(ValueError):
          _ = AdversarialPatchNumpy(ptc, learning_rate="1")
      with self.assertRaises(ValueError):
          _ = AdversarialPatchNumpy(krc, learning_rate=-1.0)
  
      with self.assertRaises(ValueError):
          _ = AdversarialPatchNumpy(ptc, max_iter=1.0)
      with self.assertRaises(ValueError):
          _ = AdversarialPatchNumpy(ptc, max_iter=-1)
  
      with self.assertRaises(ValueError):
          _ = AdversarialPatchNumpy(ptc, batch_size=1.0)
      with self.assertRaises(ValueError):
          _ = AdversarialPatchNumpy(ptc, batch_size=-1)
  
      with self.assertRaises(ValueError):
          _ = AdversarialPatchNumpy(ptc, verbose="true")
  
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import logging
  import unittest
  import numpy
  import keras
  import tensorflow
  from art.attacks.evasion.adversarial_patch.adversarial_patch import AdversarialPatch, AdversarialPatchNumpy, AdversarialPatchPyTorch
  from art.estimators.estimator import BaseEstimator, NeuralNetworkMixin
  from art.estimators.classification.classifier import ClassifierMixin
  from tests.utils import TestBase, master_seed
  from tests.utils import get_image_classifier_tf, get_image_classifier_kr
  from tests.utils import get_tabular_classifier_kr, get_image_classifier_pt
  from tests.attacks.utils import backend_test_classifier_type_check_fail
label_desc: Use image node_id 8 for calling the TestAdversarialPatch obj's underlying member method code with example usage: obj.test_check_params() without return types