def forward(self, input_tensor: torch.Tensor) -> tuple[torch.Tensor, torch.Tensor, torch.Tensor]:
        """Forward pass through generator network.

        Args:
            input_tensor (torch.Tensor): Input image tensor

        Returns:
            tuple[torch.Tensor, torch.Tensor, torch.Tensor]: Tuple containing:
                - Generated image
                - First encoder's latent vector
                - Second encoder's latent vector
        """
        latent_i = self.encoder1(input_tensor)
        gen_image = self.decoder(latent_i)
        latent_o = self.encoder2(gen_image)
        return gen_image, latent_i, latent_o
Forward pass through generator network.

        Args:
            input_tensor (torch.Tensor): Input image tensor

        Returns:
            tuple[torch.Tensor, torch.Tensor, torch.Tensor]: Tuple containing:
                - Generated image
                - First encoder's latent vector
                - Second encoder's latent vector
        
src/anomalib/models/image/ganomaly/torch_model.py