What is Generative adversarial network (GAN)?

A generative adversarial network, or GAN, is like a game between two friends who are trying to trick each other.

Imagine you have two friends: one is a generator and the other is a discriminator. The generator’s job is to make fake cookies that look just like real ones. The discriminator’s job is to tell if the cookie is real or fake.

At first, the generator makes terrible cookies, maybe they’re too big or too squashed. The discriminator easily spots them and says, “Nope, that’s not a real cookie.”

But over time, the generator gets better at making cookies. It learns what the discriminator is looking for and starts to make cookies that are almost perfect. The discriminator has to work harder to tell which cookie is fake.

This back-and-forth is like a game, the generator tries to trick the discriminator, and the discriminator tries to catch the generator out. As they play more games, both get better at what they do.

Why it’s cool

GANs are used in all sorts of places, from making realistic pictures to creating fake faces or even helping robots learn how to move! It's like having two friends who keep improving just by playing together, and that makes for some amazing results.

Take the quiz →

Examples

  1. Imagine two kids: one draws pictures, and the other tries to guess if it's real or fake. The first kid gets better at drawing when the second kid can't tell them apart.
  2. A GAN is like a chef (generator) who makes delicious-looking cakes, and a critic (discriminator) who tastes them to see if they're real or fake.
  3. GANs help create realistic images by having two AI models compete, one making pictures, the other trying to figure out which ones are real.

Ask a question

See also

Discussion

Recent activity