INFO-VAE¶
This module is the implementation of a Info Variational Auto Encoder as proposed in (https://arxiv.org/abs/1706.02262)
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.INFOVAE_MMD_Config[source]¶
Info-VAE 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’
kernel_choice (str) – The kernel to choose. Available options are [‘rbf’, ‘imq’] i.e. radial basis functions or inverse multiquadratic kernel. Default: ‘imq’.
alpha (float) – The alpha factor balancing the weigth: Default: 0.5
lbd (float) – The lambda factor. Default: 3e-2
kernel_bandwidth (float) – The kernel bandwidth. Default: 1
scales (list) – The scales to apply if using multi-scale imq kernels. If None, use a unique imq kernel. Default: [.1, .2, .5, 1., 2., 5, 10.].
- class pythae.models.INFOVAE_MMD(model_config, encoder=None, decoder=None)[source]¶
Info Variational Autoencoder model.
- Parameters
model_config (INFOVAE_MMD_Config) – The Autoencoder 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.- forward(inputs, **kwargs)[source]¶
The input data is encoded and decoded
- Parameters
inputs (BaseDataset) – An instance of pythae’s datasets
- Returns
An instance of ModelOutput containing all the relevant parameters
- Return type