Indian Institute of Technology Madras
BS Degree Programme · Examination & Study Paper
Deep Learning for Computer Vision
RNNs, attention & transformers
Examination Instructions & Guidelines
- Solve on notebook/paper first before checking solutions.
- MCQ: Exactly 1 option is correct. Negative marking applies.
- MSQ: One or more options correct. Select all to score.
- NAT: Numerical response. No negative marking.
- Scientific calculator allowed for all calculations.
- Official answer key is sealed at the end of this sheet.
End Term · 31 Aug 2025 (FN)End Term
- Q1MCQ2 Marks·Choose one option

- ASigmoid of alignment scores
- BReLU of alignment scores
- CSoftmax of alignment scores
- DLinear projections of alignment scores
- Q2MCQ2 Marks·Choose one option
Which one of the following statements is true?
- AAttention mechanisms cannot be applied to the bidirectional RNN model
- BAn image captioning network cannot be trained end-to-end even though we are using 2 different modalities to train the network
- COne of the key components in the vanilla transformer are the recurrent connections that help them to deal with variable input length.
- DNone of these
- Q3MSQ2 Marks·Choose all correct options
Which of the following techniques help control the exploding or vanishing gradient problem in recurrent neural networks?
- AGradient clipping
- BUse ReLU activation funtion to control exploding gradient and sigmoid activation to control vanishing gradients
- CUse Long Short-Term Memory (LSTM)
- DUse data augmentation methods (for example, reversing the input sequence)
End Term · 31 Aug 2025 (AN)End Term
- Q4MCQ2 Marks·Choose one option
What is the correct order of operations for processing an image through a Vision Transformer (ViT)?
- AImage patching → Positional embedding → Linear projection of flattened patches → Transformer encoder→ Classification head
- BImage patching → Linear projection of flattened patches → Positional embedding → Transformer encoder→ Classification head
- CPositional embedding → Image patching → Linear projection of flattened patches → Transformer encoder→ Classification head
- DLinear projection of Images → Image patching → Positional embedding → Transformer encoder → Classification head
- ELinear projection of Images → Image patching → Positional embedding → Transformer encoder → Transformer decoder→ Classification head
- Q5MCQ2 Marks·Choose one option
Which one of the following statements is false? (Pick the most appropriate one.)
- AAttention mechanisms can be applied to the bidirectional RNN model
- BAn image captioning network can be trained end-to-end even though we are using 2 different modalities to train the network
- COne of the key components in the vanilla transformer is the recurrent connection that help them to deal with variable input length.
- DAll of these.
- Q6MCQ2 Marks·Choose one option
In which one of the following applications would you use a many- to-one RNN architecture? Choose the most appropriate answer.
- AInput is a review of a movie and output is the sentiment of the given review
- BInput is an image and output is the textual description of the given image
- CInput is an image and output is the class to which the given image belongs
- DInput is a sentence in English language and output is the same sentence translated to Hindi language
Quiz 2 · 3 Aug 2025 (AN)Quiz 2
- Q7MCQ2 Marks·Choose one option
Which one of the following statements is True?
- AAttention mechanisms can be applied to the bidirectional RNN model
- BAn image captioning network cannot be trained end-to-end even though we are using 2 different modalities to train the network
- COne of the key components in the vanilla transformer are the recurrent connections that help them to deal with variable input length.
- DAll of these.
- Q8MCQ2 Marks·Choose one option

- A

- B

- C

- D

- A
- Q9MCQ2 Marks·Choose one option

- A

- B

- C

- D

- A
- Q10MCQ2 Marks·Choose one option
Which of the following techniques help mitigate the vanishing gradient problem in recurrent neural networks? 1. Gradient clipping 2. Use of ReLU activation to preserve gradient flow 3. Use of LSTM units 4. Data augmentation (e.g., reversing input sequence)
- A1 and 2 only
- B2 and 3 only
- C3 and 4 only
- D1, 2, and 3 only
- Q11MCQ2 Marks·Choose one option
Which of the following techniques help mitigate the exploding gradient problem in recurrent neural networks? 1. Gradient clipping 2. Use of Sigmoid activation to prevent gradient growth 3. Use of LSTM units 4. Data augmentation (e.g., reversing input sequence)
- A1 and 2 only
- B1 and 3 only
- C1, 2, and 3
- DAll of these
- Q12MCQ2 Marks·Choose one option
Which one of the following statements is false? (Pick the most appropriate one.)
- AAttention mechanisms cannot be applied to the bidirectional RNN model
- BAn image captioning network cannot be trained end-to-end even though we are using 2 different modalities to train the network
- COne of the key components in the vanilla transformer is the recurrent connection that help them to deal with variable input length.
- DAll of these
- Q13MSQ3 Marks·Choose all correct options
Which of the following is true regarding Hard Attention and Soft Attention?
- ASoft Attention is smooth and differentiable
- BVariance reduction techniques are used to train Soft Attention models
- CSoft Attention is computationally cheaper than Hard Attention when the source input is large
- DThe inference (test time) overhead is low in Hard Attention when compared to Soft Attention models
Read the passage below, then answer Q14–Q15
Suppose you want to build an encoder-decoder recurrent model with attention. The context vector at time step t is given by:

where α_(tj) refers to the alignment score between the decoder state at time t _____________and the encoder state at time _____________. Note: Please write your answer using variables
Based on the above data, answer the given subquestions.
Q14NAT1 Mark·Write the numberDecoder state at time t : _______________
Your answer:- Q15Short answer1 Mark·Write the answer
Encoder state at time: _______________
Your answer: Read the passage below, then answer Q16–Q21
Consider a Gated Recurrent Unit (GRU) cell at time step ’t’.

For each of the entities in the given subquestions, enter the appropriate number from the figure that corresponds to it:
Based on the above data, answer the given subquestions.
Q16NAT0.66 Marks·Write the numberHidden state h_(t−1)______________
Your answer:- Q17NAT0.66 Marks·Write the number
Hidden state h_t_____________
Your answer: - Q18NAT0.67 Marks·Write the number
Current Input x_t________________
Your answer: - Q19NAT0.67 Marks·Write the number
Update gate z_t_______________
Your answer: - Q20NAT0.67 Marks·Write the number
Reset gate r_t ______________
Your answer: - Q21NAT0.67 Marks·Write the number
New hidden state content e_h____________
Your answer: Read the passage below, then answer Q22–Q26

Based on the above data, answer the given subquestions.
Q22NAT0.8 Marks·Write the numberNumber of weights in Weight Matrix U1 is:______________
Your answer:- Q23NAT0.8 Marks·Write the number
Number of weights in Weight Matrix V1 is:______________
Your answer: - Q24NAT0.8 Marks·Write the number
Number of weights in Weight Matrix U2 is:__________________
Your answer: - Q25NAT0.8 Marks·Write the number
Number of weights in Weight Matrix V2 is:___________________
Your answer: - Q26NAT0.8 Marks·Write the number
Number of weights in Weight Matrix W is:_______________
Your answer: Read the passage below, then answer Q27–Q34
Q27NAT0.5 Marks·Write the numbere_(21): _________________
Your answer:- Q28NAT0.5 Marks·Write the number
e_(22): _________________
Your answer: - Q29NAT0.5 Marks·Write the number
e_(23): _________________
Your answer: - Q30NAT0.5 Marks·Write the number
α_(21): _________________
Your answer: - Q31NAT0.5 Marks·Write the number
α_(22): _________________
Your answer: - Q32NAT0.5 Marks·Write the number
α_(23): _________________
Your answer: - Q33NAT0.5 Marks·Write the number
c_(21): _________________
Your answer: - Q34NAT0.5 Marks·Write the number
c_(22): _________________
Your answer: Read the passage below, then answer Q35–Q42
Q35NAT0.5 Marks·Write the numbere_(21):_________________
Your answer:- Q36NAT0.5 Marks·Write the number
e_(22):_________________
Your answer: - Q37NAT0.5 Marks·Write the number
e_(23):_________________
Your answer: - Q38NAT0.5 Marks·Write the number
α_(21):_________________
Your answer: - Q39NAT0.5 Marks·Write the number
α_(22):_________________
Your answer: - Q40NAT0.5 Marks·Write the number
α_(23):_________________
Your answer: - Q41NAT0.5 Marks·Write the number
c_(21):_________________
Your answer: - Q42NAT0.5 Marks·Write the number
c_(22):_________________
Your answer:
Official KeyMaster Answer Key & Explanations
Official answer keys from IIT Madras BS past papers. Click any question to review.
Reveal KeyCollapse Key
Master Answer Key & Explanations
Official answer keys from IIT Madras BS past papers. Click any question to review.
Detailed Answer Notes & Working
- Q15Answer: j
- Case-sensitive: the answer must match exactly.