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

        Similar to the training step, hierarchical features are extracted from
        the CNN for each batch.

        Args:
            batch (Batch): Input batch containing image and metadata
            args: Additional arguments (unused)
            kwargs: Additional keyword arguments (unused)

        Returns:
            STEP_OUTPUT: Dictionary containing images, features, true labels
            and masks required for validation
        """
        del args, kwargs  # These variables are not used.

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

        Similar to the training step, hierarchical features are extracted from
        the CNN for each batch.

        Args:
            batch (Batch): Input batch containing image and metadata
            args: Additional arguments (unused)
            kwargs: Additional keyword arguments (unused)

        Returns:
            STEP_OUTPUT: Dictionary containing images, features, true labels
            and masks required for validation
        
src/anomalib/models/image/padim/lightning_model.py