R/autoencoder_variational.R
autoencoder_variational.Rd
A variational autoencoder assumes that a latent, unobserved random variable produces the observed data and attempts to approximate its distribution. This function constructs a wrapper for a variational autoencoder using a Gaussian distribution as the prior of the latent space.
autoencoder_variational(network, loss = "binary_crossentropy", auto_transform_network = TRUE)
network | Network architecture as a |
---|---|
loss | Reconstruction error to be combined with KL divergence in order to compute the variational loss |
auto_transform_network | Boolean: convert the encoding layer into a variational block if none is found? |
A construct of class "ruta_autoencoder"
Auto-Encoding Variational Bayes
Under the Hood of the Variational Autoencoder (in Prose and Code)
Keras example: Variational autoencoder
Other autoencoder variants: autoencoder_contractive
,
autoencoder_denoising
,
autoencoder_robust
,
autoencoder_sparse
,
autoencoder
network <- input() + dense(256, "elu") + variational_block(3) + dense(256, "elu") + output("sigmoid") learner <- autoencoder_variational(network, loss = "binary_crossentropy")