Introduction

  • Generative adversarial networks (GANs) are generative models that create new data instances resembling training data, such as images that look like real photographs but are not of actual people.

  • GANs consist of a generator that learns to produce the target output and a discriminator that learns to distinguish real data from generated data, working in tandem to enhance the realism of the output.

  • This course covers GAN fundamentals, common GAN loss functions, training challenges, and using the TF-GAN library to build GANs, assuming prior knowledge of machine learning and TensorFlow.

  • Completing Machine Learning Crash Course and having some TensorFlow programming experience are prerequisites for this GANs course.

Generative adversarial networks (GANs) are an exciting recent innovation inmachine learning. GANs aregenerative models: they create new data instancesthat resemble your training data. For example, GANs can create images that looklike photographs of human faces, even though the faces don't belong to any realperson. These images were created by a GAN:

Image of four photorealistic faces created by a generative adversarialnetwork.

Figure 1: Images generated by aGAN created by NVIDIA.

GANs achieve this level of realism by pairing a generator, which learns toproduce the target output, with a discriminator, which learns to distinguishtrue data from the output of the generator. The generator tries to fool thediscriminator, and the discriminator tries to keep from being fooled.

This course covers GAN basics, and also how to use the TF-GAN library to createGANs.

Course Learning Objectives
  • Understand the difference between generative and discriminative models.
  • Identify problems that GANs can solve.
  • Understand the roles of the generator and discriminator in a GAN system.
  • Understand the advantages and disadvantages of common GAN loss functions.
  • Identify possible solutions to common problems with GAN training.
  • Use the TF GAN library to make a GAN.

Prerequisites

This course assumes you have:

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-08-25 UTC.