class_docstr: DRÆM: A discriminatively trained reconstruction embedding for surface anomaly detection.
  
  Args:
      anomaly_source_path (str | None): Path to folder that contains the anomaly source images. Random noise will
          be used if left empty.
class_docstr_tok: ["DR\u00c6M",":","A","discriminatively","trained","reconstruction","embedding","for","surface","anomaly","detection",".","Args",":","anomaly_source_path","(","str","|","None",")",":","Path","to","folder","that","contains","the","anomaly","source","images",".","Random","noise","will","be","used","if","left","empty","."]
docstr: Validation step of DRAEM. The Softmax predictions of the anomalous class are used as anomaly map.
  
  Args:
      batch (dict[str, str | Tensor]): Batch of input images
  
  Returns:
      Dictionary to which predicted anomaly maps have been added.
docstr_tok: ["Validation","step","of","DRAEM",".","The","Softmax","predictions","of","the","anomalous","class","are","used","as","anomaly","map",".","Args",":","batch","(","dict","[","str",",","str","|","Tensor","]",")",":","Batch","of","input","images","Returns",":","Dictionary","to","which","predicted","anomaly","maps","have","been","added","."]
code: def validation_step(
      self, batch: dict[str, str | Tensor], *args, **kwargs
  ) -> STEP_OUTPUT:
      """Validation step of DRAEM. The Softmax predictions of the anomalous class are used as anomaly map.
  
      Args:
          batch (dict[str, str | Tensor]): Batch of input images
  
      Returns:
          Dictionary to which predicted anomaly maps have been added.
      """
      del args, kwargs  # These variables are not used.
  
      prediction = self.model(batch["image"])
      batch["anomaly_maps"] = prediction
      return batch
  
imports: from __future__ import annotations
  from typing import Callable
  import torch
  from omegaconf import DictConfig, ListConfig
  from pytorch_lightning.callbacks import EarlyStopping
  from pytorch_lightning.utilities.types import STEP_OUTPUT
  from torch import Tensor, nn
  from anomalib.data.utils import Augmenter
  from anomalib.models.components import AnomalyModule
  from anomalib.models.draem.loss import DraemLoss
  from anomalib.models.draem.torch_model import DraemModel
label_desc: Use image node_id 4 for calling the Draem obj's underlying member method code with example usage: obj.validation_step(batch) and returns: batch