class_docstr: Generate Anomaly Heatmap.
class_docstr_tok: ["Generate","Anomaly","Heatmap","."]
code: def __init__(
      self,
      image_size: ListConfig | tuple,
      num_nearest_neighbors: int,
      sigma: int = 4,
  ) -> None:
      super().__init__()
      self.image_size = (
          image_size
          if isinstance(image_size, tuple)
          else tuple(image_size)
      )
      self.num_nearest_neighbors = num_nearest_neighbors
      self.sigma = sigma
  
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 1 to create a new AnomalyMapGenerator object from inherited base classes: nn with example: obj = AnomalyMapGenerator(image_size, num_nearest_neighbors, sigma)