class_docstr: Generate Anomaly Heatmap.
class_docstr_tok: ["Generate","Anomaly","Heatmap","."]
docstr: Compute anomaly map based on the score.
  
  Args:
      score (Tensor): Score tensor.
  
  Returns:
      Tensor: Anomaly map.
docstr_tok: ["Compute","anomaly","map","based","on","the","score",".","Args",":","score","(","Tensor",")",":","Score","tensor",".","Returns",":","Tensor",":","Anomaly","map","."]
code: def compute_anomaly_map(self, score: Tensor) -> Tensor:
      """Compute anomaly map based on the score.
  
      Args:
          score (Tensor): Score tensor.
  
      Returns:
          Tensor: Anomaly map.
      """
      anomaly_map = score.mean(dim=1, keepdim=True)
      anomaly_map = F.interpolate(
          anomaly_map,
          size=self.image_size,
          mode="bilinear",
          align_corners=False,
      )
  
      gaussian_blur = GaussianBlur2d(sigma=self.sigma).to(score.device)
      anomaly_map = gaussian_blur(
          anomaly_map
      )  # pylint: disable=not-callable
      return anomaly_map
  
file_path: anomalib/src/anomalib/models/cfa/anomaly_map.py
imports: from __future__ import annotations
  import torch
  import torch.nn.functional
  from einops import rearrange
  from omegaconf import ListConfig
  from torch import Tensor, nn
  from anomalib.models.components import GaussianBlur2d
label_desc: Use image node_id 3 for calling the AnomalyMapGenerator obj's underlying member method code with example usage: obj.compute_anomaly_map(score) and returns: anomaly_map