Struct std::VaeConfig
struct VaeConfig {
unsigned long hidden;
unsigned long hiddenLayers;
unsigned long latent;
int act;
int recon;
float beta;
unsigned long classes;
unsigned long seed;
}Kingma & Welling 2014. The encoder outputs mu and log sigma^2 of a diagonal Gaussian q(z|x); z = mu + sigma * eps (the reparameterization trick) is decoded back. Loss per sample:
recon(x, x') + beta * KL(q(z|x) || N(0, I))
with the reconstruction summed over features. beta = 1 is the VAE, beta > 1 the beta-VAE (Higgins et al. 2017, more disentangled codes); raise beta from 0 over the first epochs for KL warm-up. classes > 0 makes it a conditional VAE (Sohn et al. 2015): the one-hot label is appended to the encoder's and the decoder's inputs.
Fields
0: unconditional
Methods
hidden 256, 1 hidden layer, ReLU, BCE, beta 1, unconditional.