class_docstr: Generate Anomaly Heatmap.
docstr: Compute the overall anomaly map via element-wise production the interpolated anomaly maps.
  
  Args:
    teacher_features (dict[str, Tensor]): Teacher features
    student_features (dict[str, Tensor]): Student features
  
  Returns:
    Final anomaly map
docstr_tok: ["Compute","the","overall","anomaly","map","via","element-wise","production","the","interpolated","anomaly","maps",".","Args",":","teacher_features","(","dict","[","str",",","Tensor","]",")",":","Teacher","features","student_features","(","dict","[","str",",","Tensor","]",")",":","Student","features","Returns",":","Final","anomaly","map"]
code: def compute_anomaly_map(
      self,
      teacher_features: dict[str, Tensor],
      student_features: dict[str, Tensor],
  ) -> torch.Tensor:
      """Compute the overall anomaly map via element-wise production the interpolated anomaly maps.
  
      Args:
        teacher_features (dict[str, Tensor]): Teacher features
        student_features (dict[str, Tensor]): Student features
  
      Returns:
        Final anomaly map
      """
      batch_size = list(teacher_features.values())[0].shape[0]
      anomaly_map = torch.ones(
          batch_size, 1, self.image_size[0], self.image_size[1]
      )
      for layer in teacher_features.keys():
          layer_map = self.compute_layer_map(
              teacher_features[layer], student_features[layer]
          )
          anomaly_map = anomaly_map.to(layer_map.device)
          anomaly_map *= layer_map
  
      return anomaly_map
  
file_path: anomalib/src/anomalib/models/stfpm/anomaly_map.py
imports: from __future__ import annotations
  import torch
  import torch.nn.functional
  from omegaconf import ListConfig
  from torch import Tensor, nn
label_desc: Use image node_id 3 for calling the AnomalyMapGenerator obj's underlying member method code with example usage: obj.compute_anomaly_map(teacher_features, student_features) and returns: anomaly_map