def forward(self, features: torch.Tensor) -> torch.Tensor:
        """Run input features through the autoencoder.

        The features are first encoded to a lower dimensional latent space and
        then decoded back to the original feature space using transposed weights.

        Args:
            features (torch.Tensor): Input feature batch of shape
                ``(N, input_dim)``.

        Returns:
            torch.Tensor: Reconstructed features of shape ``(N, input_dim)``.
        """
        encoded = F.linear(features, self.weight, self.encoder_bias)
        return F.linear(encoded, self.weight.t(), self.decoder_bias)
Run input features through the autoencoder.

        The features are first encoded to a lower dimensional latent space and
        then decoded back to the original feature space using transposed weights.

        Args:
            features (torch.Tensor): Input feature batch of shape
                ``(N, input_dim)``.

        Returns:
            torch.Tensor: Reconstructed features of shape ``(N, input_dim)``.
        
src/anomalib/models/image/fre/torch_model.py