MIWAE¶
This module is the implementation of the Multiply Importance Weighted Autoencoder proposed in (https://arxiv.org/abs/1802.04537).
Available samplers¶
Samples from a Standard normal distribution in the Autoencoder’s latent space. |
|
Fits a Gaussian Mixture in the Autoencoder’s latent space. |
|
Fits a second VAE in the Autoencoder’s latent space. |
|
Fits a Masked Autoregressive Flow in the Autoencoder’s latent space. |
|
Fits an Inverse Autoregressive Flow in the Autoencoder’s latent space. |
- class pythae.models.MIWAEConfig(input_dim=None, latent_dim=10, uses_default_encoder=True, uses_default_decoder=True, reconstruction_loss='mse', number_gradient_estimates=5, number_samples=10)[source]¶
Multiply IWAE model config class.
- Parameters
input_dim (tuple) – The input_data dimension.
latent_dim (int) – The latent space dimension. Default: None.
reconstruction_loss (str) – The reconstruction loss to use [‘bce’, ‘mse’]. Default: ‘mse’
number_gradient_estimates (int) – Number of (M-)estimates to use for the gradient estimate. Default: 5
number_samples (int) – Number of samples to use on the Monte-Carlo estimation. Default: 10
- class pythae.models.MIWAE(model_config, encoder=None, decoder=None)[source]¶
Multiply Importance Weighted Autoencoder model.
- Parameters
model_config (MIWAEConfig) – The MIWAE configuration setting the main parameters of the model.
encoder (BaseEncoder) – An instance of BaseEncoder (inheriting from torch.nn.Module which plays the role of encoder. This argument allows you to use your own neural networks architectures if desired. If None is provided, a simple Multi Layer Preception (https://en.wikipedia.org/wiki/Multilayer_perceptron) is used. Default: None.
decoder (BaseDecoder) – An instance of BaseDecoder (inheriting from torch.nn.Module which plays the role of decoder. This argument allows you to use your own neural networks architectures if desired. If None is provided, a simple Multi Layer Preception (https://en.wikipedia.org/wiki/Multilayer_perceptron) is used. Default: None.
Note
For high dimensional data we advice you to provide you own network architectures. With the provided MLP you may end up with a
MemoryError.