A minimal PyTorch proving ground for VAEs
It translates two foundational generative papers into runnable PyTorch, using MNIST as the obligatory sanity check.

What it does Implements the standard Variational Autoencoder and its conditional variant on MNIST, following the two foundational papers cited in the README. The code trains for ten epochs using default hyperparameters and produces latent-space scatter plots alongside generated digit samples. It is essentially a compact reference implementation with built-in diagnostics.
The interesting bit There is no architectural novelty here, and that is the point. The value lies in the restraint: it pairs each model with a clear visualization of its latent distribution and sampled output, making the difference between conditioned and unconditioned generation immediately visible.
Key highlights
- Clean PyTorch implementations of both VAE and CVAE.
- Side-by-side latent-space plots (
q(z|x)vs.q(z|x,c)) after training. - Generated digit grids from random latent samples for both models.
- Network depth and training settings are exposed as command-line options, though the README leaves you to discover them in the source.
- Results shown after only 10 epochs with explicitly untuned defaults.
Caveats
- Default hyperparameters are explicitly untuned; ten epochs is enough to look plausible but probably not optimal.
- The README offers minimal guidance beyond pointing at command-line options inside the source.
Verdict Worth a look if you need a readable, no-surprises baseline before building something fancier. Skip it if you are after state-of-the-art generative modeling or a dataset more exciting than MNIST.
Frequently asked
- What is timbmg/VAE-CVAE-MNIST?
- It translates two foundational generative papers into runnable PyTorch, using MNIST as the obligatory sanity check.
- Is VAE-CVAE-MNIST open source?
- Yes — timbmg/VAE-CVAE-MNIST is an open-source project tracked on heatdrop.
- What language is VAE-CVAE-MNIST written in?
- timbmg/VAE-CVAE-MNIST is primarily written in Python.
- How popular is VAE-CVAE-MNIST?
- timbmg/VAE-CVAE-MNIST has 663 stars on GitHub.
- Where can I find VAE-CVAE-MNIST?
- timbmg/VAE-CVAE-MNIST is on GitHub at https://github.com/timbmg/VAE-CVAE-MNIST.