Loading…
Glossary term
An autoencoder that learns a probabilistic representation, allowing it to generate new data.
A VAE encodes an input not to one point but to a probability distribution, described by a mean and a spread. A sample from it is decoded back to data.
Because the latent space is smooth and organized, you can sample new points and decode them to generate fresh examples.
The reparameterization trick
import torch
def sample(mu, logvar):
std = torch.exp(0.5 * logvar)
return mu + std * torch.randn_like(std) # random but differentiableVAEs introduced a principled way to generate data, and their ideas appear inside many image generators.