class_docstr: A unittest class for testing the DefensiveDistillation transformer on image data.
class_docstr_tok: ["A","unittest","class","for","testing","the","DefensiveDistillation","transformer","on","image","data","."]
docstr: Third test for PyTorch.
  :return:
docstr_tok: ["Third","test","for","PyTorch",".",":","return",":"]
code: def test_4_pytorch_iris(self):
      """
      Third test for PyTorch.
      :return:
      """
      # Create the trained classifier
      trained_classifier = get_tabular_classifier_pt()
  
      # Create the modified classifier
      transformed_classifier = get_tabular_classifier_pt(
          load_init=False
      )
  
      # Create defensive distillation transformer
      transformer = DefensiveDistillation(
          classifier=trained_classifier,
          batch_size=BATCH_SIZE,
          nb_epochs=NB_EPOCHS,
      )
  
      # Perform the transformation
      with self.assertRaises(ValueError) as context:
          _ = transformer(
              x=self.x_train_iris,
              transformed_classifier=transformed_classifier,
          )
  
      self.assertIn(
          "The input trained classifier do not produce probability outputs.",
          str(context.exception),
      )
  
file_path: adversarial-robustness-toolbox/tests/defences/test_defensive_distillation.py
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import logging
  import unittest
  import numpy
  from art.defences.transformer.evasion import DefensiveDistillation
  from tests.utils import master_seed, TestBase
  from tests.utils import get_image_classifier_tf, get_image_classifier_pt, get_image_classifier_kr
  from tests.utils import get_tabular_classifier_tf, get_tabular_classifier_kr, get_tabular_classifier_pt
label_desc: Use image node_id 8 for calling the TestDefensiveDistillation obj's underlying member method code with example usage: obj.test_4_pytorch_iris() without return types