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

        Similar to training, extracts student/teacher features from CNN and
        computes anomaly maps.

        Args:
            batch (Batch): Input batch containing images and labels.
            args: Additional arguments (unused).
            kwargs: Additional keyword arguments (unused).

        Returns:
            STEP_OUTPUT: Dictionary containing images, anomaly maps, labels and
                masks for evaluation.
        """
        del args, kwargs  # These variables are not used.

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

        Similar to training, extracts student/teacher features from CNN and
        computes anomaly maps.

        Args:
            batch (Batch): Input batch containing images and labels.
            args: Additional arguments (unused).
            kwargs: Additional keyword arguments (unused).

        Returns:
            STEP_OUTPUT: Dictionary containing images, anomaly maps, labels and
                masks for evaluation.
        
src/anomalib/models/image/stfpm/lightning_model.py