class_docstr: Implementation of a postprocessor based on adding Gaussian noise to classifier output.
docstr: Perform model postprocessing and return postprocessed output.
  
  :param preds: model output to be postprocessed.
  :return: Postprocessed model output.
docstr_tok: ["Perform","model","postprocessing","and","return","postprocessed","output",".",":","param","preds",":","model","output","to","be","postprocessed",".",":","return",":","Postprocessed","model","output","."]
code: def __call__(self, preds: np.ndarray) -> np.ndarray:
      """
      Perform model postprocessing and return postprocessed output.
  
      :param preds: model output to be postprocessed.
      :return: Postprocessed model output.
      """
      # Generate random noise
      noise = np.random.normal(
          loc=0.0, scale=self.scale, size=preds.shape
      )
  
      # Add noise to model output
      post_preds = preds.copy()
      post_preds += noise
  
      if preds.shape[1] > 1:
          # Check if model output is logits or probability
          are_probability = [is_probability(x) for x in preds]
          all_probability = np.sum(are_probability) == preds.shape[0]
  
          # Finally normalize probability output
          if all_probability:
              post_preds[post_preds < 0.0] = 0.0
              sums = np.sum(post_preds, axis=1, keepdims=True)
              post_preds /= sums
      else:
          post_preds[post_preds < 0.0] = 0.0
  
      return post_preds
  
file_path: adversarial-robustness-toolbox/art/defences/postprocessor/gaussian_noise.py
imports: import logging
  import numpy
  from art.defences.postprocessor.postprocessor import Postprocessor
  from art.utils import is_probability
label_desc: Use image node_id 2 for calling the GaussianNoise obj's underlying member method code with example usage: obj.__call__(preds) and returns: post_preds