1.Starter code for Question 1 to Question 3 of this assignment is provided in DL4CV-Assignment-5-2022.ipynb.
Use Python 3.x to run the notebook. As instructed in the notebook, write your code only in between the lines âYOUR CODE STARTS HEREâ and âYOUR CODE ENDS HEREâ.
Do not change anything else in the code; if you do, the answers you are supposed to get at the end of this assignment might be wrong.
Read documentation of each function carefully.
All the best!
1 point
For this question, please see Question 1 in the iPython notebook (.ipynb file) provided alongside. Complete your implementation under the âYOUR CODE STARTS HEREâ segment therein. What is the size of the parameter matrix corresponding to convolution layer of the second sequential block?
32 Ă 16 Ă 5 Ă 5
32 Ă 32 Ă 6 Ă 6
16 Ă 32 Ă 7 Ă 7
32 Ă 16 Ă 4 Ă 4
4) Given an input image of shape (10,10,3), you want to use one of the two following layers:
âą Fully connected layer with 2 neurons, with biases
âą Convolutional layer with three 2×2 filters (with biases) with 0 padding and a stride of 2.
If you use the fully-connected layer, the input volume is âflattenedâ into a column vector before being fed into the layer. What is the difference in the number of trainable parameters between these two layers?
(a) The fully connected layer has 566 fewer parameters
(b) The convolutional layer has 518 fewer parameters
(c) The convolutional layer has 563 fewer parameters
(d) None of the above
Ans D
5) Which of the following statements are true? Select all possible answers:
(a) The number of learnable parameters in pooling layer is 0.
(b) Dilation rate is same as stride.
(c) One pixel is affected in a convolved output by a single input pixel when even-sized filters are used.
(d) Derivative of loss w.r.t. input image X, where Y=XâW is âLâX[ij]=âL/âY(âW), where â represents convolution and â represents correlation.
Ans B
6) You are solving a binary classification task of classifying images as dog vs not-dog. You design a CNN with a single output neuron. Let the output of this neuron be z. The final output of your network, y^ is given by:
y^=Ï(ReLU(z))
You classify all inputs with a final value y^â„0.5 as dog. State whather the following statement is true or false:
“Using ReLU followed by sigmoid in the output layer will cause all predictions to be positive.”
(a) True
(b) False
Ans B
7) Parameter sharing (i.e. a feature detector that is useful for one part of the image is probably useful for another part of the image too) is one of the benefits of using convolutional networks. Among the following options given below, select the true statements about parameter sharing in ConvNets. Select all possible answers:
(a) It reduces the total number of parameters, thus reducing overfitting
(b) It allows a features detector to be used in multiple locations throughout the whole input image/input volume
(c) It allows gradient descent to set many of the parameters to zero, thus making the connection sparse
(d) None of the above
Ans C
8) Which of the following statements on Residual Networks are true? (Select all correct answers)
(a) The skip-connection makes it easy for the network to learn an identity mapping between the input and the output within a ResNet block
(b) The skip-connections compute a complex non-linear function of the input to pass to a deeper layer in the network
(c) Using a skip-connection helps the gradient to backpropagate to earlier layers in substantial amounts, and thus helps you train deeper networks
(d) None of the above
Ans A
Answers will be Uploaded Shortly and it will be Notified on Telegram, So JOIN NOW
9)Weight sharing allows CNNs to deal with image data without using too many parameters. Select the correct option from below with respect to weight sharing.
(a) Weight sharing increases bias
(b) Weight sharing increases variance
(c) It increases both bias and variance
(d) None of the above
Ans B
10) Sort the following CNN architectures in descending order based on number of parameters.
(a) AlexNet > VGGNet19 > EfficientNetB0 > ResNet50
(b) VGGNet19 > AlexNet > EfficientNetB0 > ResNet50
(c) VGGNet19 > AlexNet > ResNet50 > EfficientNetB0
(d) AlexNet > ResNet50 > VGGNet19 > EfficientNetB0
(e) AlexNet > VGGNet19 > ResNet50 > EfficientNetB0
Ans C
11) Sort the following CNN architectures in ascending order based on their top-1 accuracy on Imagenet.
(a) AlexNet < VGGNet11 < ResNet101 < EfficientNetB7
(b) AlexNet < VGGNet11 < EfficientNetB7 < ResNet101
(c) VGGNet11 < AlexNet < EfficientNetB7 < ResNet101
(d) ResNet101 < AlexNet < EfficientNetB7 < VGGNet11
Ans C
Let the input to a convolutional layer be of size DfĂDfĂM where Df=100 and M=8, and the output feature map (after passing input through conv layer) be of size DfĂDfĂN where N=32. Assume padded convolution. Let width of the square kernel in conv layer be k where k=7 (Ignore the bias term in the calculation). Calculate the number of parameters and computational cost for this convolution layer.
13) Number of Parameters: ______
Ans 32
14) Computational Cost: _______
Ans 312
Using the same dimensions specified in the previous question, calculate the number of parameters and computational cost, but make use of Depthwise Seperable convolution instead of standard convolution.
15) Number of parameters for depthwise convolution:______
Ans= 31
16) Computational Cost for for depthwise convolution: ______
Ans= 310
17) Number of parameters for pointwise convolution: ______
Ans= 30
18) Computational cost for for pointwise convolution: ______
Ans= 320
If we convolve a feature map of size 128 Ă 128 Ă 12 with a filter of size 11 Ă 11 Ă 5, and a stride of 2 across all dimensions without any padding, the width of the output volume is a and the depth of the output volume is b .
19) a: ______
Ans= 120
20) b: ______
Ans= Not Sure