dataeval.utils.models.VAEEncoder

class dataeval.utils.models.VAEEncoder(input_shape, latent_dim)

Variational Autoencoder Encoder that outputs mean and log-variance.

Parameters:
input_shape : tuple[int, int, int]

Shape of the input data in CHW format.

latent_dim : int

The size of the latent space (encoding dimension).

forward(x)

Perform a forward pass through the encoder.

Parameters:
x : torch.Tensor

Input tensor

Returns:

Mean (mu) and log-variance (logvar) of the latent distribution.

Return type:

tuple[torch.Tensor, torch.Tensor]