def training_step(self, batch: Batch, *args, **kwargs) -> None:
        """Extract features from the CNN for each training batch.

        Args:
            batch (Batch): Input batch containing images and metadata.
            *args: Variable length argument list.
            **kwargs: Arbitrary keyword arguments.

        Returns:
            torch.Tensor: Dummy tensor for Lightning compatibility.
        """
        del args, kwargs  # These variables are not used.

        embedding = self.model(batch.image)
        self.embeddings.append(embedding)

        # Return a dummy loss tensor
        return torch.tensor(0.0, requires_grad=True, device=self.device)
Extract features from the CNN for each training batch.

        Args:
            batch (Batch): Input batch containing images and metadata.
            *args: Variable length argument list.
            **kwargs: Arbitrary keyword arguments.

        Returns:
            torch.Tensor: Dummy tensor for Lightning compatibility.
        
src/anomalib/models/image/dfkde/lightning_model.py