code: def test_check_params(self):
      model = Model()
      loss_fn = nn.CrossEntropyLoss()
      optimizer = optim.Adam(model.parameters(), lr=0.01)
      pixel_cnn = PyTorchClassifier(
          model=model,
          loss=loss_fn,
          optimizer=optimizer,
          input_shape=(4,),
          nb_classes=2,
          clip_values=(0, 1),
      )
  
      with self.assertRaises(TypeError):
          _ = PixelDefend(pixel_cnn="pixel_cnn")
  
      with self.assertRaises(ValueError):
          _ = PixelDefend(pixel_cnn=pixel_cnn, eps=-1)
  
      with self.assertRaises(ValueError):
          _ = PixelDefend(pixel_cnn=pixel_cnn, clip_values=(1, 0))
  
      with self.assertRaises(ValueError):
          _ = PixelDefend(pixel_cnn=pixel_cnn, clip_values=(-1, 1))
  
      with self.assertRaises(ValueError):
          _ = PixelDefend(pixel_cnn=pixel_cnn, clip_values=(0, 2))
  
      with self.assertRaises(ValueError):
          _ = PixelDefend(pixel_cnn=pixel_cnn, batch_size=-1)
  
      with self.assertRaises(ValueError):
          _ = PixelDefend(pixel_cnn=pixel_cnn, verbose="False")
  
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import logging
  import unittest
  import numpy
  import torch.nn
  import torch.optim
  from art.estimators.classification.pytorch import PyTorchClassifier
  from art.defences.preprocessor import PixelDefend
  from art.utils import load_mnist
  from tests.utils import master_seed
label_desc: Use image node_id 4 for calling the TestPixelDefend obj's underlying member method code with example usage: obj.test_check_params() without return types