MauryaHub PYQ Practice

Introduction to Deep Learning and Generative AI · End Term · May 2026 · AN

Introduction to Deep Learning and Generative AI · End Term · May 2026 AN

← Course papers · Start practice / exam

Questions and published explanations below are available without starting a test. Some questions may not have a published solution yet.

0 / 23 published solutions

Question 2 MCQ · 3.0 marks

Assume that the shape of the input image is 32 x 32 x 100. A 1x1 convolution with 50 filters is applied. How many learnable weights will be present (excluding biases)?
A.
50
B.
100
C.
500
D.
5000

A published solution is not available for this question yet.

Report a correction for Q2

Question 3 MCQ · 3.0 marks

Consider the following statements about the Transformer architecture. 1. The encoder uses self-attention. 2. The encoder uses masked self-attention. 3. The decoder uses masked self-attention. 4. The decoder uses cross-attention. 5. The encoder uses cross-attention. Which of the following is correct?
A.
1 and 2 only
B.
1, 3 and 4 only
C.
2, 3 and 4 only
D.
1, 2, 3 and 4
E.
1, 3 and 5 only
F.
1, 2, 3, 4 and 5

A published solution is not available for this question yet.

Report a correction for Q3

Question 4 MCQ · 3.0 marks

Which model is described as producing **blurry** images because its loss averages out fine details, but has **high diversity** and **stable training**?
A.
GAN
B.
VAE
C.
DDIM
D.
Classifier

A published solution is not available for this question yet.

Report a correction for Q4

Question 5 MCQ · 4.0 marks

What is the output of the given code?
Source diagram or notation
A.Source diagram or notation
B.Source diagram or notation
C.Source diagram or notation
D.Source diagram or notation

A published solution is not available for this question yet.

Report a correction for Q5

Question 6 MCQ · 4.0 marks

In a GAN trained using the original minimax (saturating) generator objective, suppose the discriminator becomes nearly perfect very early in training. What will be the most likely consequence of this?
A.
The generator learns faster because the discriminator provides perfect classification.
B.
Both the generator and discriminator converge immediately to the optimal solution.
C.
The generator's loss becomes zero, indicating perfect image generation.
D.
The generator experiences mode collapse.
E.
The generator stops learning because it receives very small (vanishing) gradients.

A published solution is not available for this question yet.

Report a correction for Q6

Question 7 MCQ · 4.0 marks

Consider the following two code snippets executed during the training of a sequence-to-sequence model. **Code A**
Source diagram or notation
**Code B**
Source diagram or notation
where: •
Source diagram or notation
represents the decoder's output scores (logits) for all words in the vocabulary. •
Source diagram or notation
returns the predicted word (i.e., the word with the highest score). •
Source diagram or notation
is the actual (ground-truth) target word at time step
Source diagram or notation
. •
Source diagram or notation
is the word fed as input to the decoder at the next time step. Which of the following correctly identifies Code A and Code B?
A.
Code A → Teacher Forcing; Code B → Student Forcing
B.
Code A → Student Forcing; Code B → Teacher Forcing
C.
Both Code A and Code B perform Teacher Forcing.
D.
Neither Code A nor Code B performs Teacher Forcing.

A published solution is not available for this question yet.

Report a correction for Q7

Question 8 MCQ · 4.0 marks

A GAN suddenly starts producing almost the same single image regardless of the input noise z, even though the discriminator is fooled. This failure is called:
A.
Mass covering
B.
Posterior collapse
C.
Mode collapse
D.
Reparameterization

A published solution is not available for this question yet.

Report a correction for Q8

Question 9 MCQ · 4.0 marks

Three students implement masked self-attention as follows. **Student A**
Source diagram or notation
**Student B**
Source diagram or notation
**Student C**
Source diagram or notation
Which of the following students has correctly implemented masked self-attention?
A.
Only Student A
B.
Only Student B
C.
Students A and C
D.
Students B and C

A published solution is not available for this question yet.

Report a correction for Q9

Question 10 MCQ · 4.0 marks

Suppose the residual connections in the transformer block are removed, so the forward pass becomes:
Source diagram or notation
What is the most likely consequence of this change as more transformer blocks (
Source diagram or notation
) are stacked?
A.
No meaningful effect - LayerNorm already keeps activations well-scaled, so the residual path is redundant.
B.
Gradients have no direct path back to earlier layers, so as depth increases they must propagate entirely through each sub-layer's transformation, making them prone to vanishing or exploding and the network much harder to optimize.
C.
The model would no longer be able to apply the causal mask correctly, since masking depends on the residual stream.
D.
Training would fail immediately with a shape mismatch error, since the residual connection is required to keep tensor dimensions consistent.
E.
Gradients have no direct path back to earlier layers, which causes the attention weights to exceed valid probability values and produces NaN losses within the first few training iterations.

A published solution is not available for this question yet.

Report a correction for Q10

Question 11 MCQ · 5.0 marks

Which of the following is done by the given pytorch code?
Source diagram or notation
A.
MinMax Scaling
B.
Applies a Softmax Function
C.
Batch Normalization
D.
Layer Normalization

A published solution is not available for this question yet.

Report a correction for Q11

Question 12 MCQ · 5.0 marks

Consider a Transformer with an embedding dimension of 24 and 4 attention heads. For a sequence containing 10 tokens, what are the correct dimensions of query, key, and the attention score matrix for a single attention head?
A.Source diagram or notation
B.Source diagram or notation
C.Source diagram or notation
D.Source diagram or notation
E.Source diagram or notation

A published solution is not available for this question yet.

Report a correction for Q12

Question 13 MCQ · 6.0 marks

Consider the following PyTorch code:
Source diagram or notation
Which of the following will be the sequence of learning rates printed by the program?
A.Source diagram or notation
B.Source diagram or notation
C.Source diagram or notation
D.Source diagram or notation

A published solution is not available for this question yet.

Report a correction for Q13

Question 14 MSQ · 3.0 marks

Which of the following statements is/are correct with respect to RAG and fine-tuning?
A.
RAG changes the model's parameters, while fine-tuning does not.
B.
RAG supplies relevant external information as context at inference time, whereas fine-tuning involves updating model parameters using training data.
C.
Fine-tuning supplies relevant external information as context at inference time, whereas RAG involves updating model parameters using training data.
D.
Fine-tuning is required before a vector store can be used.
E.
RAG is pre-requisite step for performing fine-tuning.

A published solution is not available for this question yet.

Report a correction for Q14

Question 15 MSQ · 4.0 marks

Consider the following attention score matrix for a sequence of 4 tokens:
Source diagram or notation
A causal mask is applied before softmax. Which of the following row(s) will have exactly one non- zero attention probability after softmax?
A.
Row 1
B.
Row 2
C.
Row 3
D.
Row 4

A published solution is not available for this question yet.

Report a correction for Q15

Question 16 MSQ · 4.0 marks

Select **all** sets that are convex.
A.Source diagram or notation
B.Source diagram or notation
C.Source diagram or notation
D.Source diagram or notation

A published solution is not available for this question yet.

Report a correction for Q16

Question 17 MSQ · 4.0 marks

Consider the following code snippet:
Source diagram or notation
Which of the following statements regarding the code snippet given above is correct?
A.
Only the convolutional layers are trainable.
B.
Only the new fully connected layer will be trainable.
C.
Parameters in all the layers of the model are frozen.
D.
The model automatically retrains when the fully connected layer is added.

A published solution is not available for this question yet.

Report a correction for Q17

Question 18 MSQ · 5.0 marks

Which of the following are **false** for a transformer?
A.
Attention can be multi-headed.
B.
Attention computation is sequential across heads
C.
Attention computation is parallel across layers.
D.
Attention scores matrix is of the shape
Source diagram or notation
(T is the context length and d_model is the embedding dimension)

A published solution is not available for this question yet.

Report a correction for Q18

Question 19 MSQ · 5.0 marks

Select all the correct statements regarding the 'GPT' model:
A.
It is trained using Masked Language Modelling and an Encoder-Only architecture.
B.
It is trained using Masked Language Modelling and a Decoder-Only architecture.
C.
Positional embeddings can be used in 'GPT'.
D.
It contains cross-attention and self-attention layers.
E.
Attention scores are only computed for the current token and past tokens at every timestep.

A published solution is not available for this question yet.

Report a correction for Q19

Question 20 MSQ · 6.0 marks

A ViT processes grayscale images of resolution 128 x 128 pixels, split into non-overlapping 16 x 16 patches. Each flattened patch is projected by a single shared linear layer to a 256-dimensional embedding, and a learnable [CLS] token is prepended before the Transformer encoder. Ignoring biases, select all correct statements.
A.
Each flattened patch has length 768.
B.
The projection layer contains 65,536 weights.
C.
The projection layer contains 4,194,304 weights (one copy per patch).
D.
The sequence length entering the encoder is 65.

A published solution is not available for this question yet.

Report a correction for Q20

Question 21 NAT · 4.0 marks

We create a RNN as follows:
Source diagram or notation
What is the output of the print statement of the code?

A published solution is not available for this question yet.

Report a correction for Q21

Question 22 NAT · 5.0 marks

Using the FID formula, the real and generated covariances are
Source diagram or notation
and
Source diagram or notation
, and the means are equal. Compute the FID. (Answer to 2 decimal points)

A published solution is not available for this question yet.

Report a correction for Q22

Question 23 NAT · 5.0 marks

Consider a single layer transformer with the following specifications: Vocabulary Size=6400 Number of heads= 4 Dimension for each head= 16 Hidden layer size for the feed forward block = 200 The feed forward block only contains one hidden layer. Calculate the total trainable weights between the input layer and hidden layer of the feed forward block. (Ignore bias)

A published solution is not available for this question yet.

Report a correction for Q23

Question 24 NAT · 6.0 marks

Consider two activation functions
Source diagram or notation
and
Source diagram or notation
. Let
Source diagram or notation
, what will be the value of
Source diagram or notation
? (Round to 3 decimals)

A published solution is not available for this question yet.

Report a correction for Q24