Question 1
Consider the following code snippet:
Based on the standard normalization technique for a single-channel grayscale image dataset like FashionMNIST, which of the following correctly fills in blank (A)?

The IIT Madras BS Introduction to Deep Learning and Generative AI (Deep Learning and GenAI) Quiz 2 paper sat on 16 Aug 2026, in the May 2026 term: 19 questions for 47 marks in 120 minutes. Every question is below with its answer. Take it as a timed mock test to be marked, or read it through first.
Consider the following code snippet:
Based on the standard normalization technique for a single-channel grayscale image dataset like FashionMNIST, which of the following correctly fills in blank (A)?
Correct answer
Suppose during training Epoch 1 D(real)=0.90 D(fake)=0.10 Later Epoch 20 D(real)=0.999 D(fake)=0.0001
What problem is most likely? (Here, D(x) represents Discriminator's output on image x)
Discriminator has become too strong, leading to vanishing gradients for the generator.
Mode collapse has definitely occurred.
Generator has perfectly learned the data distribution.
The discriminator will stop updating permanently.
Correct answer
Discriminator has become too strong, leading to vanishing gradients for the generator.
Let D(x) denote the discriminator's output. Which of the following represents the most desirable discriminator output during stable GAN training?
D(real) = 0.9, D(fake) = 0.1
D(real) = 0.8, D(fake) = 0.2
D(real) = 1.0, D(fake) = 0.0
D(real) = 0.5, D(fake) = 0.5
Correct answer
D(real) = 0.5, D(fake) = 0.5
What is the output of the following code snippet?
Correct answer
Truncation eliminates the vanishing-gradient problem entirely, because gradients no longer traverse long products.
Truncation increases memory usage because the whole computation graph must be retained.
Correct answer
Consider the following implementation of a RNN:
What is the output of the print statements?
Correct answer
Which of the following options is correct regarding the standard encoder-decoder architecture?
During training, we feed the decoder's prediction from the previous step as input for the current step to stabilize learning.
We first train the encoder completely, and then using the context vector from the fully trained encoder, we train the decoder.
When working with batches of varying lengths, the loss function calculates gradients for padding tokens to ensure uniform batch updates.
None of these
Correct answer
None of these
(A figure from the original paper is missing from the source site.)
Correct answer
(A figure from the original paper is missing from the source site.)
Which of the following statements must be true?
Correct answer
A GAN is trained on images preprocessed using the following PyTorch transformation:
Which of the following activation functions are most suitable for the final layers of the Generator and Discriminator, respectively?
Tanh, Sigmoid
Sigmoid, Tanh
ReLU, Sigmoid
Tanh, Tanh
Sigmoid, Sigmoid
ReLU, ReLU
Correct answer
Tanh, Sigmoid
Select the correct statements from the following:
If the sequence length doubles while all model hyperparameters remain unchanged, the number of trainable parameters in the RNN also doubles.
The same input-to-hidden and hidden-to-hidden weight matrices are reused at every time step, regardless of the sequence length.
An RNN can process sequences of arbitrary length only if the input size changes with the sequence length.
Correct answers
The same input-to-hidden and hidden-to-hidden weight matrices are reused at every time step, regardless of the sequence length.
Which of the following increase(s) the output size?
Increasing kernel size
Increasing padding
Increasing stride
Correct answer
Increasing padding
Select all statements that are TRUE.
The intersection of two convex sets is convex, but the union of two convex sets need not be.
If every local minimum of a function is also a global minimum, the function must be convex.
Correct answers
The intersection of two convex sets is convex, but the union of two convex sets need not be.
Correct answers
Correct answers
Select all statements that are TRUE regarding the mechanics of Adagrad and RMSProp.
Assuming a constant base learning rate, Adagrad's squared-gradient accumulator only grows (or stays the same), meaning a parameter's effective learning rate can never increase over time.
In RMSProp, a parameter's effective learning rate can actually increase again if it starts receiving much smaller gradients than it did previously.
For sparse features (which rarely receive non-zero gradients), Adagrad forces the effective learning rate to decay much more slowly compared to frequently updated dense features.
Over a very long training run, RMSProp's accumulator eventually converges to the total sum of all squared gradients seen during training.
Changing Adagrad's infinite cumulative sum into an exponentially decaying average is exactly the modification that creates RMSProp and solves the vanishing learning rate problem.
Correct answers
Assuming a constant base learning rate, Adagrad's squared-gradient accumulator only grows (or stays the same), meaning a parameter's effective learning rate can never increase over time.
In RMSProp, a parameter's effective learning rate can actually increase again if it starts receiving much smaller gradients than it did previously.
For sparse features (which rarely receive non-zero gradients), Adagrad forces the effective learning rate to decay much more slowly compared to frequently updated dense features.
Changing Adagrad's infinite cumulative sum into an exponentially decaying average is exactly the modification that creates RMSProp and solves the vanishing learning rate problem.
Calculate the total number of parameters in the RNN implemented in the following code:
Correct answer: 5504
Correct answer: 117248
Correct answer: 100