class_docstr: Fully Convolutional Cross-Scale-Flows for Image-based Defect Detection.
  
  Args:
      input_size (tuple[int, int]): Size of the model input.
      n_coupling_blocks (int): Number of coupling blocks in the model.
      cross_conv_hidden_channels (int): Number of hidden channels in the cross convolution.
      clamp (int): Clamp value for glow layer.
      num_channels (int): Number of channels in the model.
class_docstr_tok: ["Fully","Convolutional","Cross-Scale-Flows","for","Image-based","Defect","Detection",".","Args",":","input_size","(","tuple","[","int",",","int","]",")",":","Size","of","the","model","input",".","n_coupling_blocks","(","int",")",":","Number","of","coupling","blocks","in","the","model",".","cross_conv_hidden_channels","(","int",")",":","Number","of","hidden","channels","in","the","cross","convolution",".","clamp","(","int",")",":","Clamp","value","for","glow","layer",".","num_channels","(","int",")",":","Number","of","channels","in","the","model","."]
docstr: Validation step for CS Flow.
  
  Args:
      batch (Tensor): Input batch
  
  Returns:
      dict[str, Tensor]: Dictionary containing the anomaly map, scores, etc.
docstr_tok: ["Validation","step","for","CS","Flow",".","Args",":","batch","(","Tensor",")",":","Input","batch","Returns",":","dict","[","str",",","Tensor","]",":","Dictionary","containing","the","anomaly","map",",","scores",",","etc","."]
code: def validation_step(
      self, batch: dict[str, str | Tensor], *args, **kwargs
  ) -> STEP_OUTPUT:
      """Validation step for CS Flow.
  
      Args:
          batch (Tensor): Input batch
  
      Returns:
          dict[str, Tensor]: Dictionary containing the anomaly map, scores, etc.
      """
      del args, kwargs  # These variables are not used.
  
      anomaly_maps, anomaly_scores = self.model(batch["image"])
      batch["anomaly_maps"] = anomaly_maps
      batch["pred_scores"] = anomaly_scores
      return batch
  
imports: from __future__ import annotations
  import logging
  import torch
  from omegaconf import DictConfig, ListConfig
  from pytorch_lightning.callbacks import Callback, EarlyStopping
  from pytorch_lightning.utilities.types import STEP_OUTPUT
  from torch import Tensor
  from anomalib.models.components import AnomalyModule
  from .loss import CsFlowLoss
  from .torch_model import CsFlowModel
label_desc: Use image node_id 3 for calling the Csflow obj's underlying member method code with example usage: obj.validation_step(batch) and returns: batch