class_docstr: A unittest class for testing the GRAPHITE attack.
class_docstr_tok: ["A","unittest","class","for","testing","the","GRAPHITE","attack","."]
code: def test_check_params(self):
      ptc = get_image_classifier_pt(from_logits=True)
  
      with self.assertRaises(ValueError):
          _ = GRAPHITEBlackbox(
              ptc,
              noise_size=(1, 1),
              net_size=(1, 1),
              heat_patch_size=(2, 2),
          )
      with self.assertRaises(ValueError):
          _ = GRAPHITEBlackbox(
              ptc,
              noise_size=(28, 28),
              net_size=(28, 28),
              heat_patch_size=(0, 1),
          )
      with self.assertRaises(ValueError):
          _ = GRAPHITEBlackbox(
              ptc,
              noise_size=(28, 28),
              net_size=(28, 28),
              heat_patch_size=(1.0, 0),
          )
      with self.assertRaises(ValueError):
          _ = GRAPHITEBlackbox(
              ptc,
              noise_size=(28, 28),
              net_size=(28, 28),
              heat_patch_stride=(0, 1),
          )
      with self.assertRaises(ValueError):
          _ = GRAPHITEBlackbox(
              ptc,
              noise_size=(28, 28),
              net_size=(28, 28),
              heat_patch_stride=(1.0, 0),
          )
      with self.assertRaises(ValueError):
          _ = GRAPHITEBlackbox(
              ptc,
              noise_size=(28, 28),
              net_size=(28, 28),
              heatmap_mode="asdf",
          )
      with self.assertRaises(ValueError):
          _ = GRAPHITEBlackbox(
              ptc, noise_size=(28, 28), net_size=(28, 28), tr_lo=-1
          )
      with self.assertRaises(ValueError):
          _ = GRAPHITEBlackbox(
              ptc, noise_size=(28, 28), net_size=(28, 28), tr_lo=1.1
          )
      with self.assertRaises(ValueError):
          _ = GRAPHITEBlackbox(
              ptc, noise_size=(28, 28), net_size=(28, 28), tr_hi=-1
          )
      with self.assertRaises(ValueError):
          _ = GRAPHITEBlackbox(
              ptc, noise_size=(28, 28), net_size=(28, 28), tr_hi=1.1
          )
      with self.assertRaises(ValueError):
          _ = GRAPHITEBlackbox(
              ptc,
              noise_size=(28, 28),
              net_size=(28, 28),
              num_xforms_mask=-1,
          )
      with self.assertRaises(ValueError):
          _ = GRAPHITEBlackbox(
              ptc,
              noise_size=(28, 28),
              net_size=(28, 28),
              num_xforms_mask=1.0,
          )
      with self.assertRaises(ValueError):
          _ = GRAPHITEBlackbox(
              ptc,
              noise_size=(28, 28),
              net_size=(28, 28),
              num_xforms_boost=-1,
          )
      with self.assertRaises(ValueError):
          _ = GRAPHITEBlackbox(
              ptc,
              noise_size=(28, 28),
              net_size=(28, 28),
              num_xforms_boost=1.0,
          )
      with self.assertRaises(ValueError):
          _ = GRAPHITEBlackbox(
              ptc,
              noise_size=(28, 28),
              net_size=(28, 28),
              num_boost_queries=0,
          )
      with self.assertRaises(ValueError):
          _ = GRAPHITEBlackbox(
              ptc,
              noise_size=(28, 28),
              net_size=(28, 28),
              num_boost_queries=1.0,
          )
      with self.assertRaises(ValueError):
          _ = GRAPHITEBlackbox(
              ptc,
              noise_size=(28, 28),
              net_size=(28, 28),
              rotation_range=(-90, 0),
          )
      with self.assertRaises(ValueError):
          _ = GRAPHITEBlackbox(
              ptc,
              noise_size=(28, 28),
              net_size=(28, 28),
              rotation_range=(90, 0),
          )
      with self.assertRaises(ValueError):
          _ = GRAPHITEBlackbox(
              ptc,
              noise_size=(28, 28),
              net_size=(28, 28),
              rotation_range=(1, 0),
          )
      with self.assertRaises(ValueError):
          _ = GRAPHITEBlackbox(
              ptc,
              noise_size=(28, 28),
              net_size=(28, 28),
              dist_range=(-1, 1),
          )
      with self.assertRaises(ValueError):
          _ = GRAPHITEBlackbox(
              ptc,
              noise_size=(28, 28),
              net_size=(28, 28),
              dist_range=(1, 0),
          )
      with self.assertRaises(ValueError):
          _ = GRAPHITEBlackbox(
              ptc,
              noise_size=(28, 28),
              net_size=(28, 28),
              gamma_range=(0, 1),
          )
      with self.assertRaises(ValueError):
          _ = GRAPHITEBlackbox(
              ptc,
              noise_size=(28, 28),
              net_size=(28, 28),
              gamma_range=(1, 0),
          )
      with self.assertRaises(ValueError):
          _ = GRAPHITEBlackbox(
              ptc,
              noise_size=(28, 28),
              net_size=(28, 28),
              crop_percent_range=(1, 0),
          )
      with self.assertRaises(ValueError):
          _ = GRAPHITEBlackbox(
              ptc,
              noise_size=(28, 28),
              net_size=(28, 28),
              off_x_range=(1, 0),
          )
      with self.assertRaises(ValueError):
          _ = GRAPHITEBlackbox(
              ptc,
              noise_size=(28, 28),
              net_size=(28, 28),
              off_y_range=(1, 0),
          )
      with self.assertRaises(ValueError):
          _ = GRAPHITEBlackbox(
              ptc,
              noise_size=(28, 28),
              net_size=(28, 28),
              blur_kernels=[-1],
          )
  
      with self.assertRaises(ValueError):
          _ = GRAPHITEWhiteboxPyTorch(ptc, net_size=(28, 28), min_tr=-1)
      with self.assertRaises(ValueError):
          _ = GRAPHITEWhiteboxPyTorch(
              ptc, net_size=(28, 28), min_tr=1.1
          )
      with self.assertRaises(ValueError):
          _ = GRAPHITEWhiteboxPyTorch(
              ptc, net_size=(28, 28), num_xforms=-1
          )
      with self.assertRaises(ValueError):
          _ = GRAPHITEWhiteboxPyTorch(
              ptc, net_size=(28, 28), num_xforms=1.0
          )
      with self.assertRaises(ValueError):
          _ = GRAPHITEWhiteboxPyTorch(
              ptc, net_size=(28, 28), step_size=0
          )
      with self.assertRaises(ValueError):
          _ = GRAPHITEWhiteboxPyTorch(
              ptc, net_size=(28, 28), step_size=-1
          )
      with self.assertRaises(ValueError):
          _ = GRAPHITEWhiteboxPyTorch(
              ptc, net_size=(28, 28), first_steps=0
          )
      with self.assertRaises(ValueError):
          _ = GRAPHITEWhiteboxPyTorch(
              ptc, net_size=(28, 28), first_steps=1.0
          )
      with self.assertRaises(ValueError):
          _ = GRAPHITEWhiteboxPyTorch(ptc, net_size=(28, 28), steps=0)
      with self.assertRaises(ValueError):
          _ = GRAPHITEWhiteboxPyTorch(ptc, net_size=(28, 28), steps=1.0)
      with self.assertRaises(ValueError):
          _ = GRAPHITEWhiteboxPyTorch(
              ptc, net_size=(28, 28), patch_removal_size=0
          )
      with self.assertRaises(ValueError):
          _ = GRAPHITEWhiteboxPyTorch(
              ptc, net_size=(28, 28), num_patches_to_remove=0
          )
      with self.assertRaises(ValueError):
          _ = GRAPHITEWhiteboxPyTorch(
              ptc, net_size=(28, 28), num_patches_to_remove=1.0
          )
      with self.assertRaises(ValueError):
          _ = GRAPHITEWhiteboxPyTorch(
              ptc, net_size=(28, 28), rotation_range=(-90, 0)
          )
      with self.assertRaises(ValueError):
          _ = GRAPHITEWhiteboxPyTorch(
              ptc, net_size=(28, 28), rotation_range=(90, 0)
          )
      with self.assertRaises(ValueError):
          _ = GRAPHITEWhiteboxPyTorch(
              ptc, net_size=(28, 28), rotation_range=(1, 0)
          )
      with self.assertRaises(ValueError):
          _ = GRAPHITEWhiteboxPyTorch(
              ptc, net_size=(28, 28), dist_range=(-1, 1)
          )
      with self.assertRaises(ValueError):
          _ = GRAPHITEWhiteboxPyTorch(
              ptc, net_size=(28, 28), dist_range=(1, 0)
          )
      with self.assertRaises(ValueError):
          _ = GRAPHITEWhiteboxPyTorch(
              ptc, net_size=(28, 28), gamma_range=(0, 1)
          )
      with self.assertRaises(ValueError):
          _ = GRAPHITEWhiteboxPyTorch(
              ptc, net_size=(28, 28), gamma_range=(1, 0)
          )
      with self.assertRaises(ValueError):
          _ = GRAPHITEWhiteboxPyTorch(
              ptc, net_size=(28, 28), crop_percent_range=(1, 0)
          )
      with self.assertRaises(ValueError):
          _ = GRAPHITEWhiteboxPyTorch(
              ptc, net_size=(28, 28), off_x_range=(1, 0)
          )
      with self.assertRaises(ValueError):
          _ = GRAPHITEWhiteboxPyTorch(
              ptc, net_size=(28, 28), off_y_range=(1, 0)
          )
      with self.assertRaises(ValueError):
          _ = GRAPHITEWhiteboxPyTorch(
              ptc, net_size=(28, 28), blur_kernels=[-1]
          )
  
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import logging
  import unittest
  import keras.backend
  import numpy
  from art.attacks.evasion import GRAPHITEBlackbox, GRAPHITEWhiteboxPyTorch
  from art.estimators.estimator import BaseEstimator
  from art.estimators.classification import ClassifierMixin
  from tests.utils import TestBase
  from tests.utils import get_image_classifier_tf, get_image_classifier_kr, get_image_classifier_pt
  from tests.utils import master_seed
  from tests.attacks.utils import backend_test_classifier_type_check_fail
label_desc: Use image node_id 6 for calling the TestGRAPHITE obj's underlying member method code with example usage: obj.test_check_params() without return types