class_docstr: Implement the defensive distillation mechanism.
  
  | Paper link: https://arxiv.org/abs/1511.04508
docstr: Perform the defensive distillation defence mechanism and return a robuster classifier.
  
  :param x: Dataset for training the transformed classifier.
  :param transformed_classifier: A classifier to be transformed for increased robustness. Note that, the
      objective loss function used for fitting inside the input transformed_classifier must support soft labels,
      i.e. probability labels.
  :return: The transformed classifier.
code: def __call__(
      self, x: np.ndarray, transformed_classifier: "CLASSIFIER_TYPE"
  ) -> "CLASSIFIER_TYPE":
      """
      Perform the defensive distillation defence mechanism and return a robuster classifier.
  
      :param x: Dataset for training the transformed classifier.
      :param transformed_classifier: A classifier to be transformed for increased robustness. Note that, the
          objective loss function used for fitting inside the input transformed_classifier must support soft labels,
          i.e. probability labels.
      :return: The transformed classifier.
      """
      # Check if the trained classifier produces probability outputs
      preds = self.classifier.predict(x=x, batch_size=self.batch_size)
      are_probability = [is_probability(y) for y in preds]
      all_probability = np.sum(are_probability) == preds.shape[0]
  
      if not all_probability:
          raise ValueError(
              "The input trained classifier do not produce probability outputs."
          )
  
      # Check if the transformed classifier produces probability outputs
      transformed_preds = transformed_classifier.predict(
          x=x, batch_size=self.batch_size
      )
      are_probability = [is_probability(y) for y in transformed_preds]
      all_probability = (
          np.sum(are_probability) == transformed_preds.shape[0]
      )
  
      if not all_probability:
          raise ValueError(
              "The input transformed classifier do not produce probability outputs."
          )
  
      # Train the transformed classifier with soft labels
      transformed_classifier.fit(
          x=x,
          y=preds,
          batch_size=self.batch_size,
          nb_epochs=self.nb_epochs,
      )
  
      return transformed_classifier
  
file_path: adversarial-robustness-toolbox/art/defences/transformer/evasion/defensive_distillation.py
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import logging
  from typing import Optional, TYPE_CHECKING
  import numpy
  from art.defences.transformer.transformer import Transformer
  from art.utils import is_probability
label_desc: Use image node_id 2 for calling the DefensiveDistillation obj's underlying member method code with example usage: obj.__call__(x, transformed_classifier) and returns: transformed_classifier