uiz Space

May 2024 term · Deep Learning · BSCS3004

Deep Learning Quiz 2: 4 August 2024 (May 2024 term)

The IIT Madras BS Deep Learning (Deep Learning) Quiz 2 paper sat on 4 Aug 2024, in the May 2024 term: 16 questions for 50 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.

Questions
16
Marks
50
Duration
120 min
MCQ
11
MSQ
1
Numerical
4

Updated

Official paper: IIT M DEGREE AN EXAM QDB2 4 Aug 2024 · No negative marking.

Question 1

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

Correct answer

  • B

Question 2

+3 marksOne correct option

Which of the following statements accurately describes the behavior of the learning rate in the AdaGrad algorithm?

  1. A

    In each iteration, the learning rate monotonically increases.

  2. B

    In each iteration, the learning rate can increase, decrease, or remain constant.

  3. C

    In each iteration, the learning rate monotonically decreases, although it may remain constant for some periods.

  4. D

    The learning rate remains constant throughout the iterations.

Show answer

Correct answer

  • C

    In each iteration, the learning rate monotonically decreases, although it may remain constant for some periods.

Question 3

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

Correct answer

  • E

Question 4

+3 marksOne correct option

What is the primary purpose of using cosine annealing with warm restarts in optimization algorithms?

  1. A

    Cosine annealing with warm restarts aims to maintain a constant learning rate throughout the optimization process.

  2. B

    Cosine annealing with warm restarts is a technique to dynamically adjust the learning rate based on the cosine function, allowing for smoother optimization trajectories.

  3. C

    Cosine annealing with warm restarts helps prevent the optimization process from getting stuck in sharp minima by periodically restarting with a higher learning rate.

  4. D

    Cosine annealing with warm restarts is a method to gradually decrease the learning rate over iterations, allowing for more precise convergence to the optimal solution.

Show answer

Correct answer

  • C

    Cosine annealing with warm restarts helps prevent the optimization process from getting stuck in sharp minima by periodically restarting with a higher learning rate.

Question 5

+3 marksOne correct option

How does dropout affect the behavior of the neural network during the inference phase?

  1. A

    All neurons are dropped randomly as in the training phase.

  2. B

    Only a subset of neurons is kept active, and their outputs are scaled by the keep probability.

  3. C

    All neurons are active, and their outputs are typically scaled by the keep probability to maintain consistency with the training phase.

  4. D

    Dropout is not applied during the inference phase, and no scaling is necessary.

Show answer

Correct answer

  • C

    All neurons are active, and their outputs are typically scaled by the keep probability to maintain consistency with the training phase.

Question 6

+3 marksOne correct option

Which of the following options correctly describes the effect of early stopping as a regularization technique in training ANNs?

  1. A

    It increases the number of epochs until the validation error starts to increase.

  2. B

    It stops training when the validation error stops decreasing and begins to increase.

  3. C

    It reduces the learning rate gradually as training progresses.

  4. D

    It adds a penalty to the loss function based on the weight values.

Show answer

Correct answer

  • B

    It stops training when the validation error stops decreasing and begins to increase.

Question 7

+3 marksOne correct option

You are experimenting with L1 and L2 regularization techniques on a deep neural network trained on a moderately sized dataset. You decide to compare their effects and make the following observations:

  • When using L1 regularization, the number of non-zero weights in the network is significantly reduced.
  • When using L2 regularization, the magnitudes of the weights are smaller, but most weights remain non-zero.
  • L1 regularization leads to a slightly higher empirical error on the training set compared to L2 regularization.
  • L2 regularization leads to better performance on the test set compared to L1 regularization.

Which of the following is the most plausible explanation for these observations?

  1. A

    L1 regularization induces sparsity, which can lead to feature selection, but might cause underfitting if too many features are removed.

  2. B

    L2 regularization encourages smaller weights, which can improve generalization but might result in a more complex model.

  3. C

    L1 regularization is generally inferior to L2 regularization in terms of generalization performance.

  4. D

    The differences in performance are primarily due to the characteristics of L1 and L2 regularization, not the size of the dataset.

Show answer

Correct answer

  • A

    L1 regularization induces sparsity, which can lead to feature selection, but might cause underfitting if too many features are removed.

Question 8

+3 marksOne correct option

What is the impact of using a sigmoid activation function on the gradients when the input to the neuron is a very large negative number?

  1. A

    The output approaches 0 and the gradient approaches 0.

  2. B

    The output approaches 0.5 and the gradient approaches 0.25.

  3. C

    The output approaches 1 and the gradient approaches 0.

  4. D

    The output approaches 0 and the gradient approaches 1.

Show answer

Correct answer

  • A

    The output approaches 0 and the gradient approaches 0.

Question 9

+3 marksOne correct option

What is the derivative of the Leaky ReLU activation function with respect to its input?

  1. A

    0 for negative inputs, 1 for positive inputs.

  2. B

    1 for negative inputs, 0 for positive inputs.

  3. C

    0.01 for negative inputs, 1 for positive inputs.

  4. D

    0.05 for negative inputs, 1 for positive inputs.

  5. E

    1 for all inputs.

Show answer

Correct answer

  • C

    0.01 for negative inputs, 1 for positive inputs.

Question 10

+3 marksOne correct option

Which of the following do not suffer from the vanishing gradient problem as well as the dead neurons problem?
1. Sigmoid
2. Tanh
3. ReLU
4. Leaky ReLU

  1. A

    Only 1

  2. B

    Only 2

  3. C

    Only 3

  4. D

    Only 4

  5. E

    Both 3 and 4

  6. F

    Both 1 and 2

Show answer

Correct answer

  • D

    Only 4

Question 11

+3 marksOne correct option

Both sigmoid and tanh activation functions saturate:

  1. A

    near 0

  2. B

    near 1

  3. C

    at large positive values

  4. D

    at large negative values

  5. E

    Both at large positive values and at large negative values

Show answer

Correct answer

  • E

    Both at large positive values and at large negative values

Question 12

+3 marksOne or more correct options

You are working on a project where you aim to predict housing prices based on various features. You have split your data into a training set and a test set. You decide to use neural network for this task and are experimenting with different regularization techniques (L1, L2).
You have the following observations from your experiments:

  • Model A: Neural Network with L1 Regularization (Lasso)
    • Empirical Test Error: 0.25
    • Train Error: 0.30
  • Model B: Neural network with L2 Regularization (Ridge)
    • Empirical Test Error: 0.20
    • Train Error: 0.27
  • Model C: Neural Network without Regularization
    • Empirical Test Error: 0.67
    • Train Error: 0.11

Given the observations from the experiments above, which of the following statements are correct? (Select all that apply)

Select all that apply.

  1. A

    Model C has the lowest train error, suggesting it generalizes the best.

  2. B

    Model C shows signs of overfitting.

  3. C

    Model B strikes a balance between bias and variance, making it a potentially good choice for regularization.

  4. D

    Model A has the highest train error, indicating it is underfitting the data.

Show answer

Correct answers

  • B

    Model C shows signs of overfitting.

  • C

    Model B strikes a balance between bias and variance, making it a potentially good choice for regularization.

Question 13

+3 marksNumerical answer

Based on the above data, answer the given subquestions.

Show answer

Correct answer: 1

Question 14

+3 marksNumerical answer

Based on the above data, answer the given subquestions.

Pass aa through the ReLU activation function and assign the output to hh.

ReLU(x)={x,if x≥00,otherwiseReLU(x) = \begin{cases} x, & if\ x \ge 0 \\ 0, & \text{otherwise} \end{cases}

Compute the output y^\hat{y} by averaging hh and calculate the squared error loss

L=0.5(y^−y)2L = 0.5(\hat{y} - y)^2

Enter the loss value

Show answer

Correct answer: 0.09 (accepted within ±0.01)

Question 15

+4 marksNumerical answer

Consider a Convolutional Neural Network (CNN) architecture for image classification with the following layers:
1. Convolutional layer with 6 filters of size 3 × 3, with a stride of 1 and no padding.
2. Max pooling layer with a pool size of 2 × 2 and a stride of 2.
3. Convolutional layer with 4 filters of size 4 × 4, with a stride of 1 and no padding.
4. Max pooling layer with a pool size of 2 × 2 and a stride of 2.
5. Fully connected layer with 20 neurons.
6. Output layer with 10 neurons (for 10 classes) using softmax activation.
If the input image size is 64 × 64 × 3, and the network has no bias term, how many parameters are there in the CNN?

Show answer

Correct answer: 16426

Question 16

+4 marksNumerical answer

Consider an intermediate feature map HH obtained after applying convolution operation on the input XX using kernel FF.

H=[3220121131−121012]H = \begin{bmatrix} 3 & 2 & 2 & 0 \\ 1 & 2 & 1 & 1 \\ 3 & 1 & -1 & 2 \\ 1 & 0 & 1 & 2 \end{bmatrix}

Apply the max-pooling operation using a filter of size 2×22 \times 2 with stride s=2s = 2 and no padding (p=0p = 0) and store the resultant output in matrix HmH_m. The prediction y^\hat{y} is simply the sum of elements in HmH_m. Suppose ∂L∂y^=1\frac{\partial L}{\partial \hat{y}} = 1 (that is, the gradient of loss with respect to the prediction). What is the gradient ∂L∂H00\frac{\partial L}{\partial H_{00}} where H00H_{00} is the element at the 0-th row and 0-th column? If you think the given info is insufficient, enter -1 as the answer.

Show answer

Correct answer: 1