class_docstr: A unittest class for testing the GaussianNoise postprocessor.
docstr: Test Gaussian noise.
docstr_tok: ["Test","Gaussian","noise","."]
code: def test_gaussian_noise(self):
      """
      Test Gaussian noise.
      """
      (_, _), (x_test, _) = self.mnist
      classifier = get_image_classifier_kr_tf()
      preds = classifier.predict(x_test[0:1])
      postprocessor = GaussianNoise(scale=0.1)
      post_preds = postprocessor(preds=preds)
  
      classifier_prediction_expected = np.asarray(
          [
              [
                  0.12109935,
                  0.0498215,
                  0.0993958,
                  0.06410096,
                  0.11366928,
                  0.04645343,
                  0.06419807,
                  0.30685693,
                  0.07616714,
                  0.05823757,
              ]
          ],
          dtype=np.float32,
      )
      post_classifier_prediction_expected = np.asarray(
          [
              [
                  0.15412168,
                  0.0,
                  0.2222987,
                  0.03007976,
                  0.0381179,
                  0.12382449,
                  0.13755375,
                  0.22279163,
                  0.07121207,
                  0.0,
              ]
          ],
          dtype=np.float32,
      )
  
      np.testing.assert_array_almost_equal(
          preds, classifier_prediction_expected, decimal=4
      )
      np.testing.assert_array_almost_equal(
          post_preds, post_classifier_prediction_expected, decimal=4
      )
  
file_path: adversarial-robustness-toolbox/tests/defences/test_gaussian_noise.py
imports: import logging
  import unittest
  import numpy
  from art.defences.postprocessor import GaussianNoise
  from art.utils import load_dataset
  from tests.utils import master_seed, get_image_classifier_kr_tf, get_image_classifier_kr_tf_binary
label_desc: Use image node_id 3 for calling the TestGaussianNoise obj's underlying member method code with example usage: obj.test_gaussian_noise() without return types