class_docstr: DSR: A Dual Subspace Re-Projection Network for Surface Anomaly Detection
  
  Args:
      latent_anomaly_strength (float, optional): Strength of the generated anomalies in the latent space.
docstr: Validation step of DSR. The Softmax predictions of the anomalous class are used as anomaly map.
  
  Args:
      batch (dict[str, str | Tensor]): Batch of input images
  
  Returns:
      STEP_OUTPUT: Dictionary to which predicted anomaly maps have been added.
docstr_tok: ["Validation","step","of","DSR",".","The","Softmax","predictions","of","the","anomalous","class","are","used","as","anomaly","map",".","Args",":","batch","(","dict","[","str",",","str","|","Tensor","]",")",":","Batch","of","input","images","Returns",":","STEP_OUTPUT",":","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 DSR. The Softmax predictions of the anomalous class are used as anomaly map.
  
      Args:
          batch (dict[str, str | Tensor]): Batch of input images
  
      Returns:
          STEP_OUTPUT: Dictionary to which predicted anomaly maps have been added.
      """
      del args, kwargs  # These variables are not used.
  
      model_outputs = self.model(batch["image"])
      batch["anomaly_maps"] = model_outputs["anomaly_map"]
      batch["pred_scores"] = model_outputs["pred_score"]
      return batch
  
imports: from __future__ import annotations
  import logging
  from pathlib import Path
  import torch
  from omegaconf import DictConfig, ListConfig
  from pytorch_lightning.utilities.types import STEP_OUTPUT
  from torch import Tensor
  from anomalib.data.utils import DownloadInfo, download_and_extract
  from anomalib.data.utils.augmenter import Augmenter
  from anomalib.models.components import AnomalyModule
  from anomalib.models.dsr.anomaly_generator import DsrAnomalyGenerator
  from anomalib.models.dsr.loss import DsrSecondStageLoss, DsrThirdStageLoss
  from anomalib.models.dsr.torch_model import DsrModel
label_desc: Use image node_id 7 for calling the Dsr obj's underlying member method code with example usage: obj.validation_step(batch) and returns: batch