class_docstr: A unittest class for testing the Pixel Attack.
  
  This module tests the Pixel Attack.
  The Pixel Attack is a generalisation of One Pixel Attack.
  
  | One Pixel Attack Paper link:
      https://ieeexplore.ieee.org/abstract/document/8601309/citations#citations
      (arXiv link: https://arxiv.org/pdf/1710.08864.pdf)
  | Pixel Attack Paper link:
      https://arxiv.org/abs/1906.06026
class_docstr_tok: ["A","unittest","class","for","testing","the","Pixel","Attack",".","This","module","tests","the","Pixel","Attack",".","The","Pixel","Attack","is","a","generalisation","of","One","Pixel","Attack",".","|","One","Pixel","Attack","Paper","link",":","https",":","\/\/ieeexplore.ieee.org\/abstract\/document\/8601309\/citations","#","citations","(","arXiv","link",":","https",":","\/\/arxiv.org\/pdf\/1710.08864.pdf",")","|","Pixel","Attack","Paper","link",":","https",":","\/\/arxiv.org\/abs\/1906.06026"]
docstr: Test with the PyTorchClassifier on a single sample. (Untargeted Attack)
  :return:
docstr_tok: ["Test","with","the","PyTorchClassifier","on","a","single","sample",".","(","Untargeted","Attack",")",":","return",":"]
code: def test_8_pytorch_mnist_single_sample(self):
      """
      Test with the PyTorchClassifier on a single sample. (Untargeted Attack)
      :return:
      """
      x_test = np.reshape(self.x_test_mnist[1], (1, 1, 28, 28)).astype(
          np.float32
      )
      classifier = get_image_classifier_pt()
      self._test_attack(
          classifier, x_test, self.y_test_mnist[[1]], False
      )
  
file_path: adversarial-robustness-toolbox/tests/attacks/test_pixel_attack.py
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import logging
  import unittest
  import numpy
  from art.attacks.evasion.pixel_threshold import PixelAttack
  from art.estimators.estimator import BaseEstimator, NeuralNetworkMixin
  from art.estimators.classification.classifier import ClassifierMixin
  from tests.utils import TestBase
  from tests.utils import get_image_classifier_tf, get_image_classifier_pt
  from tests.attacks.utils import backend_test_classifier_type_check_fail
label_desc: Use image node_id 3 for calling the TestPixelAttack obj's underlying member method code with example usage: obj.test_8_pytorch_mnist_single_sample() without return types