MauryaHub PYQ Practice

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

Introduction to Deep Learning and Generative AI · End Term · Jan 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 / 24 published solutions

Question 2 MCQ · 4.0 marks

Which of the following is the MOST correct way to run a trained model on test data?
A.
y = model(X_test)
B.
model.eval() y = model(X_test)
C.
with torch.no_grad(): y = model(X_test)
D.
model.eval() with torch.no_grad(): y = model(X_test)

A published solution is not available for this question yet.

Report a correction for Q2

Question 3 MCQ · 4.0 marks

Consider the sentence: "Data science is fun" In a bigram language model, which probability expression correctly represents the probability of the word "is"?
A.
P(is | Data, science)
B.
P(is | science)
C.
P(is | fun)
D.
P(is | science, fun)

A published solution is not available for this question yet.

Report a correction for Q3

Question 4 MCQ · 4.0 marks

We are given the Q, K, V matrices to compute the scaled dot product attention matrix for a transformer. Keeping everything else same we double every value in the V matrix. How will this change the scaled dot product attention scores that are computed?
A.
There won't be any change to the attention scores.
B.
Attention scores will double.
C.
Attention scores will get halved.
D.
Attention scores will change but we can't determine how much they will change without checking the actual values of the V matrix.

A published solution is not available for this question yet.

Report a correction for Q4

Question 5 MCQ · 4.0 marks

Consider the following code representing a component of a traditional encoder decoder model which uses Bahdanau attention:
Source diagram or notation
Which of the following completes the missing line?
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

What is the output of the following code?
Source diagram or notation
A.
(2,3,4)
B.
(0,2,1)
C.
(2,4,3)
D.
(4,2,3)

A published solution is not available for this question yet.

Report a correction for Q6

Question 7 MCQ · 4.0 marks

Consider an attention mechanism defined as: Attention(Q, K, V) = softmax(QK\(^{T}\)) V Which of the following is the most likely consequence of removing the scaling factor in this attention computation?
A.
The attention scores become smaller, leading to uniform attention weights.
B.
The dot product values grow large, causing the softmax to produce extremely peaked distributions and unstable gradients.
C.
The model becomes invariant to the dimensionality of key vectors.
D.
The attention mechanism works as usual.

A published solution is not available for this question yet.

Report a correction for Q7

Question 8 MCQ · 4.0 marks

You are training an RNN with batch_size=32 on a dataset of 1050 sequences. You notice an error occurs at the end of every epoch. Which DataLoader fix resolves this?
Source diagram or notation
A.
Set shuffle=False
B.
Increase batch_size to 64
C.
Set drop_last=True
D.
Set num_workers=0

A published solution is not available for this question yet.

Report a correction for Q8

Question 9 MCQ · 4.0 marks

What is the primary capability that the Position-wise Feed-Forward Network (FFN) provides to the Transformer architecture?
A.
The ability to attend to other tokens in the sequence and capture dependencies between words
B.
The ability to preserve and utilize positional information about token order
C.
The ability to apply non-linear transformations and learn complex feature interactions within each token's representation
D.
The ability to mix information across different positions in the sequence

A published solution is not available for this question yet.

Report a correction for Q9

Question 10 MCQ · 4.0 marks

In decoder cross-attention, which statement correctly describes where the inputs to
Source diagram or notation
and
Source diagram or notation
come from?
A.
Both
Source diagram or notation
and
Source diagram or notation
receive inputs from encoder
B.
Both
Source diagram or notation
and
Source diagram or notation
receive inputs from decoder
C.Source diagram or notation
receives encoder inputs;
Source diagram or notation
receives decoder inputs
D.Source diagram or notation
receives decoder inputs;
Source diagram or notation
receives encoder inputs

A published solution is not available for this question yet.

Report a correction for Q10

Question 11 MCQ · 4.0 marks

A transformer model has the following embedding layer: • Vocabulary size = 50,000 • Embedding dimension = 768 The embeddings are currently stored in **float32** format. You decide to optimize memory as follows: 1. Quantize **70%** of the embedding vectors to **int8** 2. Keep the remaining **30%** in **float32** (for high-frequency tokens) What is the **overall percentage reduction in memory** for the embedding matrix? (Round to the nearest integer)
A.
52%
B.
60%
C.
53%
D.
65%

A published solution is not available for this question yet.

Report a correction for Q11

Question 12 MCQ · 4.0 marks

Consider the following code:
Source diagram or notation
Which of the following describes the output of decoded_texts?
A.
The output will return decoded text strings with special tokens like [CLS] and [SEP] removed.
B.
The output will include [CLS] and [SEP] tokens explicitly in each string.
C.
The output will be a list of token IDs instead of strings and exclude special tokens.
D.
The output will return the tokenized words but still include padding tokens.

A published solution is not available for this question yet.

Report a correction for Q12

Question 13 MCQ · 4.0 marks

We use the following LORA code to finetune BERT model:
Source diagram or notation
But we notice that the code does not work as intended. Which of the following parameters of the lora need to be changed to make it work as intended?
A.
rank (r)
B.
task_type
C.
lora_dropout
D.
lora_alpha

A published solution is not available for this question yet.

Report a correction for Q13

Question 14 MSQ · 4.0 marks

Which of the following are data augmentation techniques?
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 Q14

Question 15 MSQ · 4.0 marks

Consider the following optimization algorithms used for training neural networks: • SGD with Momentum • RMSProp • Adam Which of the following statements is/are correct?
A.
SGD with Momentum accumulates an exponentially decaying moving average of past gradients to accelerate convergence along consistent directions.
B.
Momentum methods adapt individual learning rates for each parameter based on past squared gradients.
C.
RMSProp maintains a running average of squared gradients to scale learning rate.
D.
Adam combines ideas from Momentum and RMSProp by using both first and second moment estimates of gradients.
E.
Adam requires computing second-order derivatives of the loss function.
F.
Adaptive methods such as RMSProp and Adam can use different effective learning rates for different parameters.

A published solution is not available for this question yet.

Report a correction for Q15

Question 16 MSQ · 4.0 marks

Select the correct statement(s) regarding a CNN:
A.
Increasing the number of kernels proportionately increases the size of the output feature map.
B.
Increasing the number of kernels proportionately decreases the size of the output feature map.
C.
Low padding and high stride are the ideal combination if we want to minimize the reduction of the feature map size.
D.
Low padding and high stride are the ideal combination if we want to maximize the reduction of the feature map size.

A published solution is not available for this question yet.

Report a correction for Q16

Question 17 MSQ · 4.0 marks

Which of the following situations may lead to a mode collapse while training a GAN?
A.
A GAN trained on MNIST generates only the digit '3' repeatedly, even though the dataset contains digits 0-9.
B.
GAN generates limited variations of faces with similar expressions despite diverse training data.
C.
The GAN underfits the training data.
D.
The discriminator becomes accurate straightaway after training the GAN on just the first 5 images.

A published solution is not available for this question yet.

Report a correction for Q17

Question 18 MSQ · 4.0 marks

Consider the evaluation metrics commonly used for generative models: **Fréchet Inception Distance (FID)**, **Inception Score (IS)**, and **CLIP Score**. Which of the following statements are correct?
A.
FID compares the mean and covariance of real and generated feature distributions extracted from a pretrained Inception network.
B.
Inception Score directly compares generated images with real images.
C.
A lower FID score indicates that generated samples are closer to the real data distribution.
D.
Inception Score rewards images that are both classifiable (low entropy conditional distribution) and diverse (high entropy marginal distribution).
E.
CLIP Score requires real images to compute the metric.
F.
CLIP Score measures alignment between generated images and their corresponding text prompts.
G.
FID and Inception Score both explicitly evaluate text-image alignment.

A published solution is not available for this question yet.

Report a correction for Q18

Question 19 MSQ · 4.0 marks

A text-to-image generative model is evaluated on three metrics with the following results: • **FID = 8.5** • **Inception Score (IS) = 2.1** • **CLIP Score = 0.34** For comparison, a strong baseline model on the same dataset achieves: • **FID = 15.2** • **IS = 6.8** • **CLIP Score = 0.31** Which of the following interpretations are correct?
A.
The new model generates images that are statistically closer to the real data distribution than the baseline.
B.
The new model produces more class-diverse samples than the baseline.
C.
The new model likely generates less classifiable or less confident object predictions compared to the baseline.
D.
The new model aligns slightly better with the provided text prompts than the baseline.
E.
The higher CLIP score guarantees better perceptual image quality.
F.
The baseline model likely generates more diverse categories of images than the new model.

A published solution is not available for this question yet.

Report a correction for Q19

Question 20 MSQ · 5.0 marks

Consider an encoder-decoder architecture trained using maximum likelihood for sequence generation. Which of the following statements are correct?
A.
During training, the decoder may receive ground-truth tokens as inputs at subsequent time steps.
B.
During inference, the decoder conditions on its own previously generated tokens.
C.
Teacher forcing can be used during inference to give more accurate predictions.
D.
Greedy decoding can be viewed as a special case of beam search with beam width
Source diagram or notation
.
E.
Beam search trades computational cost for a broader exploration of possible output sequences.
F.
Beam search guarantees recovery of the globally optimal sequence for any fixed beam width.

A published solution is not available for this question yet.

Report a correction for Q20

Question 21 MSQ · 5.0 marks

You want to reduce parameters in multi-head attention from 4,096 to 1,024. Which of the following changes achieve(s) this? (MSQ)
A.
Reduce heads from
Source diagram or notation
to
Source diagram or notation
B.
Reduce
Source diagram or notation
from 32 to 16
C.
Reduce sequence length from 100 to 25

A published solution is not available for this question yet.

Report a correction for Q21

Question 22 MCQ · 5.0 marks

Consider the following single-layer RNN:
Source diagram or notation
You are told that the total number of learnable parameters in this RNN layer is
Source diagram or notation
. Assume the hidden size is H = 20. What are the total number of learnable parameters in the below layers if the same configuration (same input size, same hidden size H = 20,
Source diagram or notation
,
Source diagram or notation
) is used? 1. A Bidirectional GRU 2. A Bidirectional LSTM
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 Q22

Question 23 MCQ · 5.0 marks

Consider the following PyTorch model:
Source diagram or notation
**Note:** • Do not round intermediate values. • Final answer can be rounded to 3 decimal places.
A.
-0.462
B.
0.364
C.
-0.364
D.
-0.787

A published solution is not available for this question yet.

Report a correction for Q23

Question 24 NAT · 4.0 marks

Source diagram or notation

A published solution is not available for this question yet.

Report a correction for Q24

Question 25 NAT · 4.0 marks

A model is fine-tuned with the following configuration: • dataset_size = 2048 • batch_size = 16 • epochs = 2 Assuming the optimizer performs exactly one update after a fixed number of gradient accumulation steps and 64 updates are performed, how many gradient accumulation steps were used during training?

A published solution is not available for this question yet.

Report a correction for Q25