Categories
Misc

Conditional-VAE demo: "Standard way" to generate synthetic data?

Implemented Conditional-VAE on MNIST dataset using TensorFlow-2.8 and tf.GradientTape() API. You can refer to the full code here.

For generating synthetic data using trained network, there seems to be two ways:

  1. Use learned latent space: z = mu + (eps log_var)* to generate (theoretically, infinite amounts of) data. Here, we are learning ‘mu’ and ‘log_var’ vectors using the given data, and, ‘eps’ is sampled from multivariate, standard, Gaussian distribution to add stochasticity.
  2. Use multivariate, standard, Gaussian distribution = N(0, 1) as z which is then passed through VAE’s decoder.

What is the “the standard way” to generate data? (from the two options above), or, how can we find that. Neither the original Auto-Encoding Variational Bayes paper nor the β-VAE paper seem to specify the best way to generate images. The latter does say: “The most informative latent units zm of β-VAE have the highest KL divergence from the unit Gaussian prior”, confirming at least that the posterior distribution is not N(0,I) and the difference matters – reference.

submitted by /u/grid_world
[visit reddit] [comments]

Leave a Reply

Your email address will not be published. Required fields are marked *