Helper Module for Deep Learning.
Sparse Multi-Channel Variational Autoencoderfor the Joint Analysis of Heterogeneous Data.
-
class
pynet.models.vae.mcvae.MCVAE(latent_dim, n_channels, n_feats, noise_init_logvar=-3, noise_fixed=False, sparse=False, vae_model='dense', vae_kwargs=None, nodecoding=False)[source]¶ Sparse Multi-Channel Variational Autoencoder (sMCVAE).
Sparse Multi-Channel Variational Autoencoder for the Joint Analysis of Heterogeneous Data, Luigi Antelmi, Nicholas Ayache, Philippe Robert, Marco Lorenzi Proceedings of the 36th International Conference on Machine Learning, PMLR 97:302-311, 2019.
-
__init__(latent_dim, n_channels, n_feats, noise_init_logvar=-3, noise_fixed=False, sparse=False, vae_model='dense', vae_kwargs=None, nodecoding=False)[source]¶ Init class.
- Parameters
latent_dim: int
the number of latent dimensions.
n_channels: int
the number of channels.
n_feats: list of int
each channel input dimensions.
noise_init_logvar: float, default -3
default noise parameters values.
noise_fixed: bool, default False
if set not set do not required gradients on noise parameters.
sparse: bool, default False
use sparsity contraint.
vae_model: str, default “dense”
the VAE network used to encode each channel.
vae_kwargs: dict, default None
extra parameters passed initialization of the VAE model.
nodecoding: bool, default False
if set do not apply the decoding.
-
apply_threshold(z, threshold, keep_dims=True, reorder=False)[source]¶ Apply dropout threshold.
- Parameters
z: Tensor
distribution samples.
threshold: float
dropout threshold.
keep_dims: bool default True
dropout lower than threshold is set to 0.
reorder: bool default False
reorder dropout rates.
- Returns
z_keep: list
dropout rates.
-
decode(z)[source]¶ Maps the given latent codes onto the image space.
- Parameters
z: list of Tensor (N, D)
sample from the distribution having latent parameters mu, var.
- Returns
p: list of Tensor, (N, C, F)
the prediction p(x|z).
-
property
dropout¶
-
encode(x)[source]¶ Encodes the input by passing through the encoder network and returns the latent distribution for each channel.
- Parameters
x: list of Tensor, (C,) -> (N, Fc)
input tensors to encode.
- Returns
out: list of 2-uplet (C,) -> (N, D)
each channel distribution parameters mu (mean of the latent Gaussian) and logvar (standard deviation of the latent Gaussian).
-
Follow us
Inspired by AZMIND template.