docstr: Test with pytorch.
  :return:
docstr_tok: ["Test","with","pytorch",".",":","return",":"]
code: def test_3_clever_pt(self):
      """
      Test with pytorch.
      :return:
      """
      # Get MNIST
      batch_size, nb_train, nb_test = 100, 1000, 10
      (x_train, y_train), (x_test, y_test), _, _ = load_mnist()
      x_train, y_train = x_train[:nb_train], y_train[:nb_train]
      x_test, y_test = x_test[:nb_test], y_test[:nb_test]
      x_train = np.swapaxes(x_train, 1, 3).astype(np.float32)
      x_test = np.swapaxes(x_test, 1, 3).astype(np.float32)
  
      # Get the classifier
      ptc = self._create_ptclassifier()
      ptc.fit(x_train, y_train, batch_size=batch_size, nb_epochs=1)
  
      # Test targeted clever
      res0 = clever_t(
          ptc, x_test[-1], 2, 10, 5, R_L1, norm=1, pool_factor=3
      )
      res1 = clever_t(
          ptc, x_test[-1], 2, 10, 5, R_L2, norm=2, pool_factor=3
      )
      res2 = clever_t(
          ptc, x_test[-1], 2, 10, 5, R_LI, norm=np.inf, pool_factor=3
      )
      logger.info("Targeted PyTorch: %f %f %f", res0, res1, res2)
      self.assertNotEqual(res0, res1)
      self.assertNotEqual(res1, res2)
      self.assertNotEqual(res2, res0)
  
      # Test untargeted clever
      res0 = clever_u(
          ptc,
          x_test[-1],
          10,
          5,
          R_L1,
          norm=1,
          pool_factor=3,
          verbose=False,
      )
      res1 = clever_u(
          ptc,
          x_test[-1],
          10,
          5,
          R_L2,
          norm=2,
          pool_factor=3,
          verbose=False,
      )
      res2 = clever_u(
          ptc,
          x_test[-1],
          10,
          5,
          R_LI,
          norm=np.inf,
          pool_factor=3,
          verbose=False,
      )
      logger.info("Untargeted PyTorch: %f %f %f", res0, res1, res2)
      self.assertNotEqual(res0, res1)
      self.assertNotEqual(res1, res2)
      self.assertNotEqual(res2, res0)
  
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import logging
  import unittest
  import numpy
  import tensorflow
  import torch.nn
  import torch.nn.functional
  import torch.optim
  from art.attacks.evasion.hop_skip_jump import HopSkipJump
  from art.estimators.classification.keras import KerasClassifier
  from art.estimators.classification.pytorch import PyTorchClassifier
  from art.estimators.classification.tensorflow import TensorFlowClassifier
  from art.metrics.metrics import adversarial_accuracy, empirical_robustness, clever_t, clever_u, clever, loss_sensitivity, wasserstein_distance
  from art.utils import load_mnist
  from tests.utils import master_seed
label_desc: Use image node_id 11 for calling the TestMetrics obj's underlying member method code with example usage: obj.test_3_clever_pt() without return types