Quiz Space

May 2023 term · Deep Learning · BSCS3004

Deep Learning Quiz 2: 6 August 2023 (May 2023 term)

The IIT Madras BS Deep Learning (Deep Learning) Quiz 2 paper sat on 6 Aug 2023, in the May 2023 term: 15 questions for 48 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
15
Marks
48
Duration
120 min
MSQ
7
Numerical
8

Updated

Official paper: IIT M DEGREE AN3 EXAM QPE3 06 Aug 2023 · No negative marking.

Question 1

+3 marksOne or more correct options

Suppose that a neural network has millions of parameters (weights and biases). A team decides to use an optimization algorithm with a learning rate scheme that is local to each individual parameters in the network. Moreover, the learning rate changes in each iteration based on the magnitude of gradients pertaining to a parameter in the past. Which of the following optimization algorithms satisfy the team’s requirements?

Select all that apply.

  1. A

    GD with an exponentially decaying learning rate scheduler

  2. B

    AdaGrad

  3. C

    AdaM

  4. D

    NADAM

  5. E

    RMSProp

  6. F

    SGD with line search

Show answer

Correct answers

  • B

    AdaGrad

  • C

    AdaM

  • D

    NADAM

  • E

    RMSProp

Question 2

+4 marksOne or more correct options

Suppose a data set has NN samples and each sample has two features f1∈{0,1}f_1 \in \{0, 1\} and f2∈{0,1}f_2 \in \{0, 1\}. Assume that f1f_1 is a sparse feature and f2f_2 is a dense feature (that is, f1f_1 value for most of the samples is zero). Further, we apply Stochastic Gradient Descent on this data and plot a contour plot of the loss surface and observe the movement of parameters (i.e., trajectory) across iterations. Let w1w_1 and w2w_2 be the parameters corresponding to f1f_1 and f2f_2 respectively.

Assume bias to be zero for this question and the parameters are initialized to zero.

In the contour plot of a loss surface, what is the initial movement expected to look like if w1w_1 is plotted on the horizontal axis and w2w_2 is plotted on the vertical axis?

Hint: Think of the possible configurations of inputs for the first few iterations

Select all that apply.

  1. A

    Zig-zag movement along the horizontal axis

  2. B

    Zig-zag movement along the vertical axis

  3. C

    Mostly straight along the horizontal axis

  4. D

    Mostly straight along the vertical axis

  5. E

    Insufficient data

Show answer

Correct answers

  • B

    Zig-zag movement along the vertical axis

  • D

    Mostly straight along the vertical axis

Question 3

+4 marksOne or more correct options

Select all that apply.

  1. A

    ADAM takes more memory than AdaGrad

  2. B

    ADAM takes lesser memory than AdaGrad

  3. C

    AdaGrad takes more memory than RMSprop

  4. D

    Vanilla GD takes lesser memory than AdaGrad

Show answer

Correct answers

  • A

    ADAM takes more memory than AdaGrad

  • D

    Vanilla GD takes lesser memory than AdaGrad

Question 4

+4 marksOne or more correct options

Select all that apply.

  1. A

    Model A has a low bias and low variance

  2. B

    Model B has a low bias

  3. C

    Model B has a high variance

  4. D

    Model A has a low bias

Show answer

Correct answers

  • B

    Model B has a low bias

  • D

    Model A has a low bias

Question 5

+3 marksOne or more correct options

Select all that apply.

  1. A
  2. B
  3. C
  4. D
  5. E
  6. F
Show answer

Correct answers

  • A
  • D
  • F

Question 6

+5 marksOne or more correct options

We know that the weight update rule for gradient descent algorithm is given by

wt+1=wt−ηt∇wtw_{t+1} = w_t - \eta_t \nabla w_t

which is equivalently written as

wt+1=w0−ηt∑i=1t∇wiw_{t+1} = w_0 - \eta_t \sum_{i=1}^{t} \nabla w_i

Choose all the correct bounds

Select all that apply.

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

Correct answers

  • B
  • C
  • D

Question 7

+3 marksOne or more correct options

Which of the following activation function(s) is (are) prone to vanishing gradient problem?

Select all that apply.

  1. A

    Logistic Sigmoid

  2. B

    Tanh

  3. C

    ReLU

  4. D

    ReLu6

  5. E

    Leaky ReLu

  6. F

    GELU

  7. G

    MaxOut

Show answer

Correct answers

  • A

    Logistic Sigmoid

  • B

    Tanh

  • C

    ReLU

  • D

    ReLu6

Question 8

+2 marksNumerical answer

An input image of dimension 35 × 35 × 3 is to be convolved with 20 filters (kernels) of spatial dimension 3 × 3. In all the sub-questions, assume a bias term for kernels.

Suppose that we pad zeros of size 2 (p = 2) around the sides of the image (in all channels). Assume stride 2 for the convolution operation. All the 20 filters have bias associated with it. What is the dimension of the output volume? Enter the number of elements in the output volume.

Show answer

Correct answer: 7220

Question 9

+2 marksNumerical answer

An input image of dimension 35 × 35 × 3 is to be convolved with 20 filters (kernels) of spatial dimension 3 × 3. In all the sub-questions, assume a bias term for kernels.

How many numbers of parameters are there in the convolution layer?

Show answer

Correct answer: 560

Question 10

+3 marksNumerical answer

An input image of dimension 35 × 35 × 3 is to be convolved with 20 filters (kernels) of spatial dimension 3 × 3. In all the sub-questions, assume a bias term for kernels.

Suppose we flatten the output of convolution layer, that is Rm×n×k→Rm⋅n⋅k×1\mathbb{R}^{m \times n \times k} \to \mathbb{R}^{m \cdot n \cdot k \times 1} and apply 1-D kernel of dimension 10×110 \times 1 (no zero padding, stride=5).

The result of this convolution operation is then connected to a fully connected layer of dimension 10×110 \times 1 with a weight matrix WW and a bias bb. How many parameters are there in the ENTIRE network then?

Show answer

Correct answer: 15011

Question 11

+3 marksNumerical answer

The input matrix XX and the kernels (K,F)(K, F) are given below.

The bias value for both kernels is initialized at 0.5

X=[010101001],K=[11−11],F=[1−111]X = \begin{bmatrix} 0 & 1 & 0 \\ 1 & 0 & 1 \\ 0 & 0 & 1 \end{bmatrix}, \quad K = \begin{bmatrix} 1 & 1 \\ -1 & 1 \end{bmatrix}, \quad F = \begin{bmatrix} 1 & -1 \\ 1 & 1 \end{bmatrix}

In the subsequent questions, assume no padding and stride one wherever necessary.

Please be careful in your calculations as the questions are linked

Create two feature maps by convolving the kernels K, F over the input matrix X and stack the outputs to create a tensor as shown below. The dimension of A is m x n x 2. The first feature map of size m x n is the output for K and the second feature map of size m x n is for F. What is the sum of the elements in the tensor A?

Show answer

Correct answer: 12

Question 12

+3 marksNumerical answer

The input matrix XX and the kernels (K,F)(K, F) are given below.

The bias value for both kernels is initialized at 0.5

X=[010101001],K=[11−11],F=[1−111]X = \begin{bmatrix} 0 & 1 & 0 \\ 1 & 0 & 1 \\ 0 & 0 & 1 \end{bmatrix}, \quad K = \begin{bmatrix} 1 & 1 \\ -1 & 1 \end{bmatrix}, \quad F = \begin{bmatrix} 1 & -1 \\ 1 & 1 \end{bmatrix}

In the subsequent questions, assume no padding and stride one wherever necessary.

Please be careful in your calculations as the questions are linked

Show answer

Correct answer: 9

Question 13

+2 marksNumerical answer

The input matrix XX and the kernels (K,F)(K, F) are given below.

The bias value for both kernels is initialized at 0.5

X=[010101001],K=[11−11],F=[1−111]X = \begin{bmatrix} 0 & 1 & 0 \\ 1 & 0 & 1 \\ 0 & 0 & 1 \end{bmatrix}, \quad K = \begin{bmatrix} 1 & 1 \\ -1 & 1 \end{bmatrix}, \quad F = \begin{bmatrix} 1 & -1 \\ 1 & 1 \end{bmatrix}

In the subsequent questions, assume no padding and stride one wherever necessary.

Please be careful in your calculations as the questions are linked

Show answer

Correct answer: 9

Question 14

+4 marksNumerical answer

The input matrix XX and the kernels (K,F)(K, F) are given below.

The bias value for both kernels is initialized at 0.5

X=[010101001],K=[11−11],F=[1−111]X = \begin{bmatrix} 0 & 1 & 0 \\ 1 & 0 & 1 \\ 0 & 0 & 1 \end{bmatrix}, \quad K = \begin{bmatrix} 1 & 1 \\ -1 & 1 \end{bmatrix}, \quad F = \begin{bmatrix} 1 & -1 \\ 1 & 1 \end{bmatrix}

In the subsequent questions, assume no padding and stride one wherever necessary.

Please be careful in your calculations as the questions are linked

Show answer

Correct answer: -3

Question 15

+3 marksNumerical answer

The input matrix XX and the kernels (K,F)(K, F) are given below.

The bias value for both kernels is initialized at 0.5

X=[010101001],K=[11−11],F=[1−111]X = \begin{bmatrix} 0 & 1 & 0 \\ 1 & 0 & 1 \\ 0 & 0 & 1 \end{bmatrix}, \quad K = \begin{bmatrix} 1 & 1 \\ -1 & 1 \end{bmatrix}, \quad F = \begin{bmatrix} 1 & -1 \\ 1 & 1 \end{bmatrix}

In the subsequent questions, assume no padding and stride one wherever necessary.

Please be careful in your calculations as the questions are linked

Enter the sum of updated bias (exclude weights).

Show answer

Correct answer: -3