Deep learning systems have gotten really great at identifying patterns in text, images, and video. But applications that create realistic images, natural sentences and paragraphs, or native-quality translations have proven elusive. Generative Adversarial Networks, or GANs, offer a promising solution to these challenges by pairing two competing neural networks—one that generates content and the other that rejects samples that are of poor quality.
GANs in Action strikes that rare balance between an applied programming book, an academic book heavy on theory, and a conversational blog post on machine learning techniques.
1 Introduction to GANs
1.3 What Are Generative Adversarial Networks?
1.3.1 GAN in Action
1.4 GAN Training
1.4.1 GAN Training Visualized
1.4.2 Reaching Equilibrium
1.4.3 The Pros and Cons of Studying GANs
1.5 Applications of GANs
1.6 Guide to this Book
2 Autoencoders as a Path to GANs
2.1 Why did we include this chapter?
2.2 What does this have to do with GANs?
2.3 What are the reasons behind autoencoders?
2.4 Overview of Autoencoders
2.5 Usage of autoencoders
2.6 Unsupervised learning
2.7 New take on an old idea
2.8 Variational autoencoder (VAE)
2.9 Code is life
3 Your First GAN: Generating Handwritten Digits
3.1 The Theory Behind GANs
3.1.1 Adversarial Training
3.1.2 Generator and Discriminator
3.1.3 GAN Training Algorithm
3.2 Tutorial: Generating Handwritten Digits
3.2.1 Import Statements
3.2.2 The Generator
3.2.3 The Discriminator
3.2.4 Build the Model
3.2.6 Outputting Sample Images
3.2.7 Run the Model
3.2.8 Inspecting the Results
4 Diving Deep with DCGAN
4.2 Convolutional Neural Networks (ConvNets)
4.2.1 Convolutional Filters
4.2.2 Parameter Sharing
4.3 Brief History of DCGAN
4.4 Batch Normalization
4.5 Computing Batch Normalization
4.5.1 Tutorial: Generating Handwritten Digits with DCGAN
4.5.2 Import Statements
4.5.3 The Generator
4.5.4 The Discriminator
4.5.5 Build & Run the DCGAN
4.5.6 Model Output
5 Training & Common Challenges: GANing for Success
5.1.1 Inception Score
5.1.2 Fréchet Inception Distance
5.2 Training challenges
5.2.1 Network depth
5.2.2 Game set-ups
5.2.3 Training hacks
6 Progressive Growing of GANs
7 Semi-Supervised GAN
8 Conditional GAN
9 Cycle-Consistent Adversarial Networks
10 Adversarial Examples
11 Practical application of GANs
Appendix A: Technical/deployments
About the Technology
GANs have already achieved remarkable results that have been thought impossible for artificial systems, such as the ability to generate realistic faces, turn a scribble into a photograph-like image, are turn video footage of a horse into a running zebra. Most importantly, GANs learn quickly without the need for vast troves of painstakingly labeled training data.
Invented by Google’s Ian Goodfellow in 2014, Generative Adversarial Networks (GANs) are one of the most important innovations in deep learning. In GANs, one neural network (the generator) generates content—images, sentences, and so on—and another (the discriminator) determines whether or not they come from the generator, and are therefore “fake,” or from the training dataset, and are therefore “real.” In the interplay between the two systems, the generator creates more realistic output as it attempts to fool the discriminator into believing the “fakes” are real. The result is a generator that can produce photorealistic images or natural text and speech, and a well-trained discriminator that can precisely identify and categorize that type of content.
About the book
GANs in Action: Deep learning with Generative Adversarial Networks teaches you how to build and train your own generative adversarial networks. First, you’ll get an introduction to generative modelling and how GANs work, along with an overview of their potential uses. Then, you’ll start building your own simple adversarial system, as you explore the foundation of GAN architecture: the generator and discriminator networks.
As you work through the book’s captivating examples and detailed illustrations, you’ll learn to train different GAN architectures for different scenarios. You’ll explore generating high-resolution images, image-to-image translation, and adversarial learning, as well as targeted data generation, as you grow your system to be smart, effective, and fast.
- Understanding GANs and their potential
- Hands-on code tutorials to build GAN models
- Common challenges for your GANs
- Advanced GAN architectures and techniques like Cycle-Consistent Adversarial Networks
- Handling the progressive growing of GANs
- Practical applications of GANs
About the readerWritten for data scientists and data analysts with intermediate Python knowledge. Knowing the basics of deep learning will also be helpful.
About the author
Jakub Langr graduated from Oxford University where he also taught at OU Computing Services. He has worked in data science since 2013, most recently as a data science Tech Lead at Filtered.com and as a data science consultant at Mudano. Jakub also designed and teaches Data Science courses at the University of Birmingham and is a fellow of the Royal Statistical Society.
Vladimir Bok is a Senior Product Manager at Intent Media, a data science company for leading travel sites, where he helps oversee the company’s Machine Learning research and infrastructure teams. Prior to that, he was a Program Manager at Microsoft. Vladimir graduated Cum Laude with a degree in Computer Science from Harvard University. He has worked as a software engineer at early stage FinTech companies, including one founded by PayPal co-founder Max Levchin, and as a Data Scientist at a Y Combinator startup.
A great practical introduction to generative adversarial networks.
An enjoyable overview of the field of GANs.
Does a great job explaining GANs at a conceptual level and motivates me to want to learn more.