Companion repository to GANs in Action: Deep learning with Generative Adversarial Networks
Jupyter Notebook
1,034
101 commits
updated Jul 23, 2025
This is the official companion repository to the book GANs in Action: Deep Learning with Generative Adversarial Networks by Jakub Langr and Vladimir Bok, published by Manning Publications.
This repo lets you reproduce, study, and extend every hands‑on example from the book. The notebooks walk through every major variant in the GAN family, from the original vanilla GAN to CycleGAN, using Keras/TensorFlow.
This repository contains practical implementations of various Generative Adversarial Network architectures discussed in the book "GANs in Action". Each chapter includes Jupyter notebooks with fully functional code examples that demonstrate key concepts and techniques in GAN development.
gans-in-action/
├── chapter-2/ # Autoencoders
├── chapter-3/ # Vanilla GAN
├── chapter-4/ # Deep Convolutional GAN (DCGAN)
├── chapter-6/ # Progressive GAN
├── chapter-7/ # Semi-Supervised GAN
├── chapter-8/ # Conditional GAN
├── chapter-9/ # CycleGAN
├── chapter-10/ # Adversarial examples
└── requirements.txt # Python dependencies
Each implementation in this repository is based on groundbreaking research. Here are the canonical papers for each GAN architecture covered:
Paper: Generative Adversarial Networks
Authors: Ian J. Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, Yoshua Bengio
Year: 2014
Key Contribution: Introduced the foundational GAN framework with adversarial training between generator and discriminator networks.
Paper: Unsupervised Representation Learning with Deep Convolutional Generative Adversarial Networks
Authors: Alec Radford, Luke Metz, Soumith Chintala
Year: 2015
Key Contribution: Established architectural guidelines for stable GAN training using convolutional networks.
Paper: Progressive Growing of GANs for Improved Quality, Stability, and Variation
Authors: Tero Karras, Timo Aila, Samuli Laine, Jaakko Lehtinen
Year: 2017
Key Contribution: Introduced progressive training methodology for generating high-resolution images.
Paper: Semi-Supervised Learning with Generative Adversarial Networks
Authors: Augustus Odena
Year: 2016
Key Contribution: Extended GANs for semi-supervised learning by modifying the discriminator to output class labels.
Paper: Conditional Generative Adversarial Nets
Authors: Mehdi Mirza, Simon Osindero
Year: 2014
Key Contribution: Enabled conditional generation by incorporating label information into both generator and discriminator.
Paper: Unpaired Image-to-Image Translation using Cycle-Consistent Adversarial Networks
Authors: Jun-Yan Zhu, Taesung Park, Phillip Isola, Alexei A. Efros
Year: 2017
Key Contribution: Enabled image-to-image translation without paired training data using cycle consistency loss.
git clone https://github.com/GANs-in-Action/gans-in-action.git
cd gans-in-action
python -m venv gan_env
source gan_env/bin/activate # On Windows: gan_env\Scripts\activate
pip install -r requirements.txt
Navigate to any chapter directory and launch Jupyter Notebook:
cd chapter-3
jupyter notebook
Open the notebook file (e.g., Chapter_3_GAN.ipynb) and run the cells sequentially.
[-1, 1] rangeD_lr > G_lr)D_loss and G_loss should be balancedLayerNorm/InstanceNorm in discriminator0.2 slope) and ReLU in generatorIf you use this code in your research, please cite the book:
@book{langr2019gans,
title={GANs in Action: Deep Learning with Generative Adversarial Networks},
author={Langr, Jakub and Bok, Vladimir},
year={2019},
publisher={Manning Publications}
}
This code is provided under the MIT License. See the LICENSE file for details.
We welcome contributions to improve this repository! If you find any issues, have suggestions for improvements, or want to add more comprehensive examples, please feel free to open an issue or submit a pull request.
Made with ❤️ by the GANs in Action team
68 commits
33 commits
Jupyter Notebook
100.0%
Companion repository to GANs in Action: Deep learning with Generative Adversarial Networks
Jupyter Notebook
1,034
101 commits
updated Jul 23, 2025
This is the official companion repository to the book GANs in Action: Deep Learning with Generative Adversarial Networks by Jakub Langr and Vladimir Bok, published by Manning Publications.
This repo lets you reproduce, study, and extend every hands‑on example from the book. The notebooks walk through every major variant in the GAN family, from the original vanilla GAN to CycleGAN, using Keras/TensorFlow.
This repository contains practical implementations of various Generative Adversarial Network architectures discussed in the book "GANs in Action". Each chapter includes Jupyter notebooks with fully functional code examples that demonstrate key concepts and techniques in GAN development.
gans-in-action/
├── chapter-2/ # Autoencoders
├── chapter-3/ # Vanilla GAN
├── chapter-4/ # Deep Convolutional GAN (DCGAN)
├── chapter-6/ # Progressive GAN
├── chapter-7/ # Semi-Supervised GAN
├── chapter-8/ # Conditional GAN
├── chapter-9/ # CycleGAN
├── chapter-10/ # Adversarial examples
└── requirements.txt # Python dependencies
Each implementation in this repository is based on groundbreaking research. Here are the canonical papers for each GAN architecture covered:
Paper: Generative Adversarial Networks
Authors: Ian J. Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, Yoshua Bengio
Year: 2014
Key Contribution: Introduced the foundational GAN framework with adversarial training between generator and discriminator networks.
Paper: Unsupervised Representation Learning with Deep Convolutional Generative Adversarial Networks
Authors: Alec Radford, Luke Metz, Soumith Chintala
Year: 2015
Key Contribution: Established architectural guidelines for stable GAN training using convolutional networks.
Paper: Progressive Growing of GANs for Improved Quality, Stability, and Variation
Authors: Tero Karras, Timo Aila, Samuli Laine, Jaakko Lehtinen
Year: 2017
Key Contribution: Introduced progressive training methodology for generating high-resolution images.
Paper: Semi-Supervised Learning with Generative Adversarial Networks
Authors: Augustus Odena
Year: 2016
Key Contribution: Extended GANs for semi-supervised learning by modifying the discriminator to output class labels.
Paper: Conditional Generative Adversarial Nets
Authors: Mehdi Mirza, Simon Osindero
Year: 2014
Key Contribution: Enabled conditional generation by incorporating label information into both generator and discriminator.
Paper: Unpaired Image-to-Image Translation using Cycle-Consistent Adversarial Networks
Authors: Jun-Yan Zhu, Taesung Park, Phillip Isola, Alexei A. Efros
Year: 2017
Key Contribution: Enabled image-to-image translation without paired training data using cycle consistency loss.
git clone https://github.com/GANs-in-Action/gans-in-action.git
cd gans-in-action
python -m venv gan_env
source gan_env/bin/activate # On Windows: gan_env\Scripts\activate
pip install -r requirements.txt
Navigate to any chapter directory and launch Jupyter Notebook:
cd chapter-3
jupyter notebook
Open the notebook file (e.g., Chapter_3_GAN.ipynb) and run the cells sequentially.
[-1, 1] rangeD_lr > G_lr)D_loss and G_loss should be balancedLayerNorm/InstanceNorm in discriminator0.2 slope) and ReLU in generatorIf you use this code in your research, please cite the book:
@book{langr2019gans,
title={GANs in Action: Deep Learning with Generative Adversarial Networks},
author={Langr, Jakub and Bok, Vladimir},
year={2019},
publisher={Manning Publications}
}
This code is provided under the MIT License. See the LICENSE file for details.
We welcome contributions to improve this repository! If you find any issues, have suggestions for improvements, or want to add more comprehensive examples, please feel free to open an issue or submit a pull request.
Made with ❤️ by the GANs in Action team
68 commits
33 commits
Jupyter Notebook
100.0%