Controlling the sampling from Variational AutoEncoder (VAE)

Suppose a Variational Autoencoder (VAE) is trained with mnist data. To sample, one draws from normal distribution. My question is: suppose I am interested in generating only 1s and no other digits. How can do I do that? do I sample until I generate a 1 and then I keep sampling from the neighborhood of that point? or is there a more controlled way to tell the VAE what digit to generate? Thanks

Edit*

The ideal encoder would take any input and generate a sample coming from $\mathcal{N}(0,1)$. If the input is 1 or 2 or 3, the samplings will all come from $\mathcal{N}(0,1)$, so, how does the decoder know if the input was 1, 2, or 3?

Topic vae sampling

Category Data Science


You condition the latent variable on another variable drawn from a categorical distribution (https://wiseodd.github.io/techblog/2016/12/17/conditional-vae/).

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.