GANs by the notebook: paper code you can actually run
A readable, side-by-side PyTorch and TensorFlow implementation of foundational GAN papers, aimed at developers who want to see the math become pixels.

What it does This repository contains Jupyter notebook implementations of classic GAN papers: Goodfellow’s original Vanilla GAN and Radford’s DCGAN, each in both PyTorch and TensorFlow. Everything trains on standard datasets (MNIST, CIFAR-10) and includes before/after visualizations of generated images.
The interesting bit The dual-framework approach is the real value. Most repos pick one framework and run with it; here you can compare identical architectures in PyTorch and TensorFlow line-by-line. There’s also a linked Medium post that walks through the theory, making this less a research artifact and more a teaching tool.
Key highlights
- Vanilla GAN and DCGAN implementations, each with PyTorch and TensorFlow notebooks
- Trains on MNIST (1D vector inputs) and CIFAR-10 (3D convolutional inputs)
- Before/after training image comparisons included for each model
- Accompanying blog post for theoretical background
- Straightforward notebook structure — no buried config files or CLI abstractions
Caveats
- Only two GAN variants implemented; the “multiple GANs” framing is slightly generous
- No training metrics, loss curves, or quantitative evaluation (FID, IS) visible in the README
- Last substantial activity appears to be several years ago based on paper dates
Verdict Good for students or engineers crossing between PyTorch and TensorFlow who want clean, minimal implementations of the GAN fundamentals. Skip it if you need modern architectures (StyleGAN, diffusion) or production-ready training pipelines.
Frequently asked
- What is diegoalejogm/gans?
- A readable, side-by-side PyTorch and TensorFlow implementation of foundational GAN papers, aimed at developers who want to see the math become pixels.
- Is gans open source?
- Yes — diegoalejogm/gans is open source, released under the MIT license.
- What language is gans written in?
- diegoalejogm/gans is primarily written in Jupyter Notebook.
- How popular is gans?
- diegoalejogm/gans has 841 stars on GitHub.
- Where can I find gans?
- diegoalejogm/gans is on GitHub at https://github.com/diegoalejogm/gans.