class_docstr: Generate Anomaly Heatmap.
  
  Args:
      image_size (ListConfig, tuple): Size of the input image. The anomaly map is upsampled to this dimension.
      sigma (int, optional): Standard deviation for Gaussian Kernel. Defaults to 4.
docstr: Compute anomaly score.
  
  Scores are calculated based on embedding vector, mean and inv_covariance of the multivariate gaussian
  distribution.
  
  Args:
      embedding (Tensor): Embedding vector extracted from the test set.
      mean (Tensor): Mean of the multivariate gaussian distribution
      inv_covariance (Tensor): Inverse Covariance matrix of the multivariate gaussian distribution.
  
  Returns:
      Output anomaly score.
docstr_tok: ["Compute","anomaly","score",".","Scores","are","calculated","based","on","embedding","vector",",","mean","and","inv_covariance","of","the","multivariate","gaussian","distribution",".","Args",":","embedding","(","Tensor",")",":","Embedding","vector","extracted","from","the","test","set",".","mean","(","Tensor",")",":","Mean","of","the","multivariate","gaussian","distribution","inv_covariance","(","Tensor",")",":","Inverse","Covariance","matrix","of","the","multivariate","gaussian","distribution",".","Returns",":","Output","anomaly","score","."]
code: def compute_anomaly_map(
      self, embedding: Tensor, mean: Tensor, inv_covariance: Tensor
  ) -> Tensor:
      """Compute anomaly score.
  
      Scores are calculated based on embedding vector, mean and inv_covariance of the multivariate gaussian
      distribution.
  
      Args:
          embedding (Tensor): Embedding vector extracted from the test set.
          mean (Tensor): Mean of the multivariate gaussian distribution
          inv_covariance (Tensor): Inverse Covariance matrix of the multivariate gaussian distribution.
  
      Returns:
          Output anomaly score.
      """
  
      score_map = self.compute_distance(
          embedding=embedding,
          stats=[
              mean.to(embedding.device),
              inv_covariance.to(embedding.device),
          ],
      )
      up_sampled_score_map = self.up_sample(score_map)
      smoothed_anomaly_map = self.smooth_anomaly_map(
          up_sampled_score_map
      )
  
      return smoothed_anomaly_map
  
file_path: anomalib/src/anomalib/models/padim/anomaly_map.py
imports: from __future__ import annotations
  import torch
  import torch.nn.functional
  from omegaconf import ListConfig
  from torch import Tensor, nn
  from anomalib.models.components import GaussianBlur2d
label_desc: Use image node_id 5 for calling the AnomalyMapGenerator obj's underlying member method code with example usage: obj.compute_anomaly_map(embedding, mean, inv_covariance) and returns: smoothed_anomaly_map