class_docstr: PL Lightning Module for the FastFlow algorithm.
  
  Args:
      input_size (tuple[int, int]): Model input size.
      backbone (str): Backbone CNN network
      pre_trained (bool, optional): Boolean to check whether to use a pre_trained backbone.
      flow_steps (int, optional): Flow steps.
      conv3x3_only (bool, optinoal): Use only conv3x3 in fast_flow model. Defaults to False.
      hidden_ratio (float, optional): Ratio to calculate hidden var channels. Defaults to 1.0.
class_docstr_tok: ["PL","Lightning","Module","for","the","FastFlow","algorithm",".","Args",":","input_size","(","tuple","[","int",",","int","]",")",":","Model","input","size",".","backbone","(","str",")",":","Backbone","CNN","network","pre_trained","(","bool",",","optional",")",":","Boolean","to","check","whether","to","use","a","pre_trained","backbone",".","flow_steps","(","int",",","optional",")",":","Flow","steps",".","conv3x3_only","(","bool",",","optinoal",")",":","Use","only","conv3x3","in","fast_flow","model",".","Defaults","to","False",".","hidden_ratio","(","float",",","optional",")",":","Ratio","to","calculate","hidden","var","channels",".","Defaults","to","1.0","."]
docstr: Forward-pass the input and return the anomaly map.
  
  Args:
      batch (dict[str, str | Tensor]): Input batch
  
  Returns:
      STEP_OUTPUT | None: batch dictionary containing anomaly-maps.
docstr_tok: ["Forward-pass","the","input","and","return","the","anomaly","map",".","Args",":","batch","(","dict","[","str",",","str","|","Tensor","]",")",":","Input","batch","Returns",":","STEP_OUTPUT","|","None",":","batch","dictionary","containing","anomaly-maps","."]
code: def validation_step(
      self, batch: dict[str, str | Tensor], *args, **kwargs
  ) -> STEP_OUTPUT:
      """Forward-pass the input and return the anomaly map.
  
      Args:
          batch (dict[str, str | Tensor]): Input batch
  
      Returns:
          STEP_OUTPUT | None: batch dictionary containing anomaly-maps.
      """
      del args, kwargs  # These variables are not used.
  
      anomaly_maps = self.model(batch["image"])
      batch["anomaly_maps"] = anomaly_maps
      return batch
  
file_path: anomalib/src/anomalib/models/fastflow/lightning_model.py
imports: from __future__ import annotations
  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, optim
  from anomalib.models.components import AnomalyModule
  from anomalib.models.fastflow.loss import FastflowLoss
  from anomalib.models.fastflow.torch_model import FastflowModel
label_desc: Use image node_id 3 for calling the Fastflow obj's underlying member method code with example usage: obj.validation_step(batch) and returns: batch