def validation_step(self, batch: Batch, *args, **kwargs) -> STEP_OUTPUT:
        """Perform a validation step of CS-Flow model.

        Args:
            batch (Batch): Input batch containing images and targets
            *args: Additional positional arguments (unused)
            **kwargs: Additional keyword arguments (unused)

        Returns:
            STEP_OUTPUT: Dictionary containing predictions including anomaly maps
                and scores

        Example:
            >>> batch = Batch(image=torch.randn(32, 3, 256, 256))
            >>> model = Csflow()
            >>> predictions = model.validation_step(batch)
        """
        del args, kwargs  # These variables are not used.

        predictions = self.model(batch.image)
        return batch.update(**predictions._asdict())
Perform a validation step of CS-Flow model.

        Args:
            batch (Batch): Input batch containing images and targets
            *args: Additional positional arguments (unused)
            **kwargs: Additional keyword arguments (unused)

        Returns:
            STEP_OUTPUT: Dictionary containing predictions including anomaly maps
                and scores

        Example:
            >>> batch = Batch(image=torch.randn(32, 3, 256, 256))
            >>> model = Csflow()
            >>> predictions = model.validation_step(batch)
        
src/anomalib/models/image/csflow/lightning_model.py