class_docstr: Generate Anomaly Heatmap.
code: def __init__(
      self,
      image_size: ListConfig | tuple,
      pool_layers: list[str],
  ) -> None:
      super().__init__()
      self.distance = torch.nn.PairwiseDistance(p=2, keepdim=True)
      self.image_size = (
          image_size
          if isinstance(image_size, tuple)
          else tuple(image_size)
      )
      self.pool_layers: list[str] = pool_layers
  
file_path: anomalib/src/anomalib/models/cflow/anomaly_map.py
imports: from __future__ import annotations
  from typing import List, cast
  import torch
  import torch.nn.functional
  from omegaconf import ListConfig
  from torch import Tensor, nn
label_desc: Use image node_id 1 to create a new AnomalyMapGenerator object from inherited base classes: nn with example: obj = AnomalyMapGenerator(image_size, pool_layers)