def forward(self, batch: torch.Tensor) -> tuple[torch.Tensor, torch.Tensor, torch.Tensor]:
        """Encode a batch of input features to the latent space.

        Args:
            batch (torch.Tensor): Batch of input images.

        Returns:
        Encoded feature maps.
        """
        b1 = self.block1(batch)
        mp1 = self.mp1(b1)
        b2 = self.block2(mp1)
        mp2 = self.mp2(b2)
        b3 = self.block3(mp2)
        return b1, b2, b3
Encode a batch of input features to the latent space.

        Args:
            batch (torch.Tensor): Batch of input images.

        Returns:
        Encoded feature maps.
        
src/anomalib/models/image/dsr/torch_model.py