GAN stands for Generative Adversarial Network. It is a type of model used to generate new data similar to a given dataset.
Click to reveal answer
beginner
What are the two main parts of a GAN?
A GAN has two parts: the Generator, which creates fake images, and the Discriminator, which tries to tell real images from fake ones.
Click to reveal answer
intermediate
How does the Generator learn to create better images?
The Generator learns by trying to fool the Discriminator. When the Discriminator is tricked, the Generator improves its image creation.
Click to reveal answer
beginner
What is the role of the Discriminator in a GAN?
The Discriminator's role is to classify images as real (from the dataset) or fake (from the Generator). It helps the Generator improve by providing feedback.
Click to reveal answer
intermediate
Why is GAN training considered a game between two networks?
GAN training is like a game because the Generator and Discriminator compete: the Generator tries to create realistic images, and the Discriminator tries to detect fakes. This competition improves both.
Click to reveal answer
What is the main goal of the Generator in a GAN?
ATo label images in the dataset
BTo classify images as real or fake
CTo create images that look real enough to fool the Discriminator
DTo reduce the size of the dataset
✗ Incorrect
The Generator tries to create images that look real to trick the Discriminator.
Which part of a GAN decides if an image is real or fake?
AGenerator
BDiscriminator
CEncoder
DDecoder
✗ Incorrect
The Discriminator's job is to tell if an image is real or generated (fake).
During GAN training, what happens when the Discriminator gets better at spotting fakes?
AThe training ends immediately
BThe Generator stops learning
CThe Discriminator becomes the Generator
DThe Generator improves to create more realistic images
✗ Incorrect
As the Discriminator improves, the Generator must create better images to fool it.
What kind of data is typically generated by GANs in image generation tasks?
ANew images similar to training images
BAudio signals
CText descriptions
DRandom noise
✗ Incorrect
GANs generate new images that look like the images they were trained on.
Why is GAN training described as adversarial?
ABecause the Generator and Discriminator compete against each other
BBecause it uses adversarial examples for testing
CBecause it trains on adversarial attacks
DBecause it uses adversarial loss only for the Discriminator
✗ Incorrect
The Generator and Discriminator compete, which is why the training is called adversarial.
Explain how the Generator and Discriminator work together during GAN training for image generation.
Think of it as a game where one tries to trick the other.
You got /4 concepts.
Describe why GANs are useful for generating new images and how their training process helps improve image quality.
Focus on the role of competition and learning from feedback.
You got /4 concepts.
Practice
(1/5)
1. What are the two main parts of a GAN used for image generation?
easy
A. Convolution and Pooling
B. Encoder and Decoder
C. Input Layer and Output Layer
D. Generator and Discriminator
Solution
Step 1: Understand GAN components
A GAN consists of two parts: a generator that creates images and a discriminator that evaluates them.
Step 2: Match parts to options
Only Generator and Discriminator correctly names these two parts as Generator and Discriminator.
Final Answer:
Generator and Discriminator -> Option D
Quick Check:
GAN parts = Generator and Discriminator [OK]
Hint: Remember GAN = Generator + Discriminator [OK]
Common Mistakes:
Confusing GAN parts with autoencoder parts
Thinking GAN uses Encoder and Decoder
Mixing up layers with GAN components
2. Which of the following is the correct way to define the generator model in PyTorch for a GAN?
easy
A. generator = nn.Sequential(nn.Linear(784, 256), nn.ReLU(), nn.Linear(256, 100), nn.Softmax())
B. generator = nn.Sequential(nn.Conv2d(1, 64, 3), nn.Sigmoid())
C. generator = nn.Sequential(nn.Linear(100, 256), nn.ReLU(), nn.Linear(256, 784), nn.Tanh())
D. generator = nn.Sequential(nn.ConvTranspose2d(100, 1, 3), nn.ReLU())
Solution
Step 1: Identify generator input and output sizes
The generator takes a noise vector (size 100) and outputs an image vector (size 784 for 28x28 images).
Step 2: Check model layers and activations
generator = nn.Sequential(nn.Linear(100, 256), nn.ReLU(), nn.Linear(256, 784), nn.Tanh()) correctly uses Linear layers from 100 to 256 to 784 with ReLU and Tanh activations, common in GAN generators.