uiz Space

January 2026 term · Introduction to Deep Learning and Generative AI · BSDA2001

Introduction to Deep Learning and Generative AI End Term: 10 May 2026, Set S2 (January 2026 term)

The IIT Madras BS Introduction to Deep Learning and Generative AI (Deep Learning and GenAI) End Term paper sat on 10 May 2026, in the January 2026 term, set S2: 24 questions for 100 marks in 180 minutes. Every question is below with its answer. Take it as a timed mock test to be marked, or read it through first.

Questions
24
Marks
100
Duration
180 min
MSQ
4
MCQ
18
Numerical
2

Updated

Official paper: Introduction To Deep Learning And Generative Ai 06 May 26 (Session 2) · No negative marking.

Question 1

+4 marksOne or more correct options

Which of the following orders of operations is/are CORRECT for a single training iteration in PyTorch?

Select all that apply.

  1. A

    Forward → Backward → Zero gradients → Optimizer step

  2. B

    Forward → Zero gradients → Backward → Optimizer step

  3. C

    Zero gradients → Optimizer step → Forward → Backward

  4. D

    Zero gradients → Forward → Backward → Optimizer step

  5. E

    Backward → Forward → Optimizer step → Zero gradients

Show answer

Correct answers

  • B

    Forward → Zero gradients → Backward → Optimizer step

  • D

    Zero gradients → Forward → Backward → Optimizer step

Question 2

+4 marksOne or more correct options

Which of the following is/are NOT present in a standard GPT (decoder-only) model?

Select all that apply.

  1. A

    Positional Embeddings

  2. B

    Word Embeddings

  3. C

    MultiHead Cross Attention Layer

  4. D

    MultiHead Self Attention Layer for the Encoder

  5. E

    MultiHead Self Attention Layer for the Decoder

Show answer

Correct answers

  • C

    MultiHead Cross Attention Layer

  • D

    MultiHead Self Attention Layer for the Encoder

Question 3

+4 marksOne or more correct options

Consider the following RAG pipeline:

Which of the following is/are true?

Select all that apply.

  1. A

    The pipeline is incomplete as a RAG generation pipeline because no LLM is present to generate the final response.

  2. B

    The retriever and formatter will still be executed as part of the pipeline.

  3. C

    The pipeline correctly performs retrieval-augmented generation.

  4. D

    The pipeline behaves exactly the same as a complete RAG pipeline with an LLM.

Show answer

Correct answers

  • A

    The pipeline is incomplete as a RAG generation pipeline because no LLM is present to generate the final response.

  • B

    The retriever and formatter will still be executed as part of the pipeline.

Question 4

+4 marksOne correct option

Consider the following PyTorch network:

  1. A
  2. B
  3. C
  4. D
Show answer

Correct answer

  • B

Question 5

+4 marksOne correct option
  1. A
  2. B
  3. C
  4. D
Show answer

Correct answer

  • A

Question 6

+4 marksOne correct option

Consider the following code snippet:

What will be the output?

  1. A
  2. B
  3. C
  4. D
Show answer

Correct answer

  • B

Question 7

+4 marksOne correct option

Consider the following single-layer RNN:

  1. A

    10

  2. B

    20

  3. C

    30

  4. D

    40

Show answer

Correct answer

  • B

    20

Question 8

+4 marksOne correct option
  1. A

    3840, 5120

  2. B

    1920, 2560

  3. C

    6400, 8000

  4. D

    1280, 2560

Show answer

Correct answer

  • A

    3840, 5120

Question 9

+4 marksOne correct option
  1. A

    AD and AE

  2. B

    BD and CD

  3. C

    BD and BF

  4. D

    CD and CE

Show answer

Correct answer

  • C

    BD and BF

Question 10

+4 marksOne correct option

You are given:
• Image size: 64 × 64 • Patch size: 16 × 16 • Number of input channels: 3 (RGB) • Embedding dimension: 128
You want to implements patch embedding using a single nn.Conv2d layer in PyTorch such that:
• Each patch becomes one token. • The convolution extracts non-overlapping patches. • The output shape becomes:
(B, 128, 4, 4)
where B is batch size.
You write:

Which of the following configurations correctly implement non-overlapping 16×16 patches?

  1. A

    kernel_size = 3, stride = 1, padding = 1

  2. B

    kernel_size = 16, stride = 8, padding = 0

  3. C

    kernel_size = 16, stride = 16, padding = 0

  4. D

    kernel_size = 4, stride = 4, padding = 0

Show answer

Correct answer

  • C

    kernel_size = 16, stride = 16, padding = 0

Question 11

+4 marksOne correct option

We build a decoder RNN from scratch with the following hyperparameters:
• Batch_size=32 • Vocab_size=28 • Context_length=10 • Hidden_size=64
The following code is used to create the hidden layer:

What will be the final dimension of the hidden layer?

  1. A

    32x28

  2. B

    32x64

  3. C

    64x32

  4. D

    28x64

  5. E

    64x28

  6. F

    32x10

Show answer

Correct answer

  • B

    32x64

Question 12

+4 marksOne correct option

The following code computes a metric -

Which of the following situations does the above metric becomes useful in?

  1. A

    Generating next tokens in a text summarization task.

  2. B

    Identifying which token is most semantically similar to a given token.

  3. C

    Generating fixed positional embeddings for tokens.

  4. D

    Creating word embedding vectors to be fed into a transformer model.

Show answer

Correct answer

  • B

    Identifying which token is most semantically similar to a given token.

Question 13

+4 marksOne correct option

You are preparing a dataset to train an encoder-decoder model with the first batch of training data as follows:
Training data:
[Good evening sir,
Amazing data today and a great meeting too,
The sky is blue]
What will be the output dimension when you process the data with the following line of code? Assume word-level tokenization.

  1. A

    3x8

  2. B

    8x3

  3. C

    8x8

  4. D

    8x1

Show answer

Correct answer

  • B

    8x3

Question 14

+4 marksOne correct option

In a Transformer layer, the residual connection is typically implemented as:

  1. A

    output = SubLayer(input)

  2. B

    output = input × SubLayer(input)

  3. C

    output = concat(input, SubLayer(input))

  4. D

    output = input + SubLayer(input)

Show answer

Correct answer

  • D

    output = input + SubLayer(input)

Question 15

+4 marksOne correct option

Given a tensor with shape (batch_size = 32, seq_len = 50, d_model = 768), how is Layer Normalization applied in a Transformer?

  1. A

    It is applied once per batch (32 times), normalizing across all tokens and features.

  2. B

    It is applied once per sequence position (50 times), normalizing across batch and features.

  3. C

    It is applied independently to each token (32 × 50 = 1600 times), normalizing across the 768 feature dimensions.

  4. D

    It is applied once per feature dimension (768 times), normalizing across batch and sequence length.

Show answer

Correct answer

  • C

    It is applied independently to each token (32 × 50 = 1600 times), normalizing across the 768 feature dimensions.

Question 16

+4 marksOne correct option

In Layer Normalization, which parameters are learned during training?

  1. A

    Mean and variance

  2. B

    Gain (γ) and bias (β)

  3. C

    Only the normalization threshold

  4. D

    No parameters are learned; it's a fixed operation

Show answer

Correct answer

  • B

    Gain (γ) and bias (β)

Question 17

+4 marksOne correct option

The following tokenizer is applied on the input data given in the code:

  1. A

    0

  2. B

    -1

  3. C

    1

  4. D

    It will randomly take a value from −1, 0, or 1.

Show answer

Correct answer

  • A

    0

Question 18

+4 marksOne correct option

Consider a RAG application (uses chunking and cosine similarity to compare chunks) .
The input query to the RAG is given who's embedding vector is as follows: [1,0.5,1]
The vector store contains 3 chunk embeddings as follows:
C1 = [0,1,0.9] C2 = [1,1,1] C3 = [0.2,0,0.5]
Which chunk will be retrieved when the RAG application executes the input query?

  1. A

    C1

  2. B

    C2

  3. C

    C3

  4. D

    C1 and C2 are equally likely.

Show answer

Correct answer

  • B

    C2

Question 19

+4 marksOne correct option

A tokenizer is configured as follows:

You preprocess the following text:
text = "Deep learning is amazing"

Which of the following is the most likely format of tokens["input_ids"]?

  1. A
  2. B
  3. C
  4. D
Show answer

Correct answer

  • B

Question 20

+5 marksOne or more correct options

Which of the following statements about the Universal Approximation Theorem (UAT) is/are correct?

Select all that apply.

  1. A

    A neural network must have at least two hidden layers to approximate any continuous function.

  2. B

    A single hidden layer neural network with a non-linear activation function can approximate any continuous function on a compact domain, given sufficient neurons.

  3. C

    The Universal Approximation Theorem guarantees that the network can learn the function efficiently during training.

  4. D

    The Universal Approximation Theorem holds only for ReLU activation functions.

  5. E

    The Universal Approximation Theorem does not apply if the activation function is linear.

Show answer

Correct answers

  • B

    A single hidden layer neural network with a non-linear activation function can approximate any continuous function on a compact domain, given sufficient neurons.

  • E

    The Universal Approximation Theorem does not apply if the activation function is linear.

Question 21

+5 marksOne correct option

The following table lists optimizers and hyperparameter sets in shuffled order.

Which of the following matchings is correct?

  1. A

    A-4, B-3, C-2, D-1

  2. B

    A-2, B-1, C-3, D-4

  3. C

    A-2, B-4, C-3, D-1

  4. D

    A-3, B-4, C-2, D-1

Show answer

Correct answer

  • C

    A-2, B-4, C-3, D-1

Question 22

+5 marksOne correct option

Consider the following code snippets:

Which of the above snippets is more likely to reduce overfitting?

  1. A

    Snippet 1

  2. B

    Snippet 2 is better because it avoids noise

  3. C

    Both are equally resistant

  4. D

    None of them is resistant to overfitting

Show answer

Correct answer

  • A

    Snippet 1

Question 23

+5 marksNumerical answer
Show answer

Correct answer: 34.85 (accepted within ±0.35)

Question 24

+4 marksNumerical answer

Consider a word embedding model with a vocabulary size of 3200 and a hidden dimension of 64.
The model uses fixed sinusoidal positional encodings based on token positions.
How many trainable parameters are present in the positional encoding layer? (Ignore bias terms.)

Show answer

Correct answer: 0