Click the table of contents to start reading.
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.
Part 1: Introduction to GANs and generative modeling
1 Introduction to GANs
1.1 What are Generative Adversarial Networks?
1.2 How do GANs work?
1.3 GANs in action
1.3.1 GAN training
1.3.2 Reaching equilibrium
1.4 Why study GANs?
2 Intro to generative modeling with autoencoders
2.1 Introduction to generative modeling
2.2 How do autoencoders function on a high level?
2.3 What are autoencoders to GANs?
2.4 What is an autoencoder made of?
2.5 Usage of autoencoders
2.6 Unsupervised learning
2.6.1 New take on an old idea
2.6.2 Generation using an autoencoder
2.6.3 Variational autoencoder
2.7 Code is life
2.8 Why did we try a GAN?
3 Your first GAN: Generating handwritten digits
3.1 Foundations of GANs: Adversarial training
3.1.1 Cost functions
3.1.2 Training process
3.2 The Generator and the Discriminator
3.2.1 Conflicting objectives
3.2.2 Confusion matrix
3.3 GAN training algorithm
3.4 Tutorial: Generating handwritten digits
3.4.1 Importing statements
3.4.2 Implementing the Generator
3.4.3 Implementing the Discriminator
3.4.4 Building the model
3.4.6 Outputting sample images
3.4.7 Running the model
3.4.8 Inspecting the results
4 Deep Convolutional GAN
4.1 Convolutional neural networks
4.1.1 Convolutional filters
4.1.2 Parameter sharing
4.1.3 ConvNets visualized
4.2 Brief history of the DCGAN
4.3 Batch normalization
4.3.1 Understanding normalization
4.3.2 Computing batch normalization
4.4 Tutorial: Generating handwritten digits with DCGAN
4.4.1 Importing modules and specifying model input dimensions
4.4.2 Implementing the Generator
4.4.3 Implementing the Discriminator
4.4.4 Building and running the DCGAN
4.4.5 Model output
Part 2: Advanced topics in GANs
5 Training and common challenges: GANing for success
5.1.1 Evaluation framework
5.1.2 Inception score
5.1.3 Fréchet inception distance
5.2 Training challenges
5.2.1 Adding network depth
5.2.2 Game setups
5.2.3 Min-Max GAN
5.2.4 Non-Saturating GAN
5.2.5 When to stop training
5.2.6 Wasserstein GAN
5.3 Summary of game setups
5.4 Training hacks
5.4.1 Normalizations of inputs
5.4.2 Batch normalization
5.4.3 Gradient penalties
5.4.4 Train Discriminator more
5.4.5 Avoid sparse gradients
5.4.6 Soft and noisy labels
6 Progressing with GANs
6.1 Latent space interpolation
6.2 They grow up so fast
6.2.1 Progressive growing and smoothing in of higher-resolution layers
6.2.2 Example implementation
6.2.3 Mini-batch standard deviation
6.2.4 Equalized learning rate
6.2.5 Pixel-wise feature normalization in the generator
6.3 Summary of key innovations
6.4 TensorFlow Hub and hands-on
6.5 Practical applications
7 Semi-Supervised GAN
7.1 Introducing the Semi-Supervised GAN
7.1.1 What is a Semi-Supervised GAN?
7.1.3 Training process
7.1.4 Training objective
7.2 Tutorial: Implementing a Semi-Supervised GAN
7.2.1 Architecture diagram
7.2.4 The dataset
7.2.5 The Generator
7.2.6 The Discriminator
7.2.7 Build the model
7.3 Comparison to a fully supervised classifier
8 Conditional GAN
8.2 What is Conditional GAN?
8.2.1 CGAN Generator
8.2.2 CGAN Discriminator
8.2.3 Summary table
8.2.4 Architecture diagram
8.3 Tutorial: Implementing Conditional GAN
8.3.3 CGAN Generator
8.3.4 CGAN Discriminator
8.3.5 Build the model
8.3.7 Outputting sample images
8.3.8 Train the model
8.3.9 Inspecting the output: Targeted data generation
9.1 Image-to-image translation
9.2 Cycle-consistency loss: There and back aGAN
9.3 Adversarial loss
9.4 Identity loss
9.5.1 CycleGAN architecture: building the network
9.5.2 Generator architecture
9.5.3 Discriminator architecture
9.6 Object-oriented design of GANs
9.7 Tutorial: CycleGAN
9.7.1 Building the network
9.7.2 Building the Discriminator
9.7.3 Running CycleGAN
9.8 Expansions, augmentations, and applications
9.8.1 Augmented CycleGAN
Part 3: Where to go from here
10 Adversarial examples
10.1 Context of adversarial examples
10.2 Lies, damned lies, and distributions
10.3 Use and abuse of training
10.4 Signal and the noise
10.5 Not all hope is lost
10.6 Adversaries to GANs
11 Practical applications of GANs
11.1 GANs in medicine
11.1.1 Using GANs to improve diagnostic accuracy
11.2 GANs in fashion
11.2.1 Using GANs to design fashion
11.2.3 Creating new items matching individual preferences
11.2.4 Adjusting existing items to better match individual preferences
12 Looking ahead
12.2 GAN innovations
12.3 Relativistic GAN
12.4 Self-Attention GAN
12.6 Further reading
12.7 Looking back and closing thoughts
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.
placing your order...Don't refresh or navigate away from the page.