Deep Learning Exam

Programming, Machine Learning, Deep Learning · exam

Browse all intelligence artificielle et données documents

Question 1 (Short Answers, 08 points):

1- How does splitting a dataset into train, dev and test sets help identify overfitting? (2pts).

We must make sure that train and dev have the same distribution , also if model

fits the training so much, it can’t learn very well . And we can identified by low

train error and high dev error.

2- You are designing a deep learning system to detect driver fatigue in cars. It is crucial that

that your model detects fatigue, to prevent any accidents. Which of the following is the

most appropriate evaluation metric: Accuracy, Precision, Recall, Loss Value. Explain

your choice (1pt).

All of them because we must consider all situations of drivers fatigue.

3- Which of the following techniques does NOT prevent a model from overfitting? (1pts).

(i) Data augmentation

(ii) Dropout

(iii) Early stopping

(iv) None of the above **

4- You are given a dataset of 10×10 grayscale images. Your goal is to build a 5-class classifier.

You have to adopt one of the following two options (2pts):

Advertisement

The input is flattened into a 100-dimensional vector, followed by a fully-connected layer with 5

neurons •

The input is directly given to a convolutional layer with five 10 × 10 filters

The second option is better because we don’t have to flatten the input.

5- You are doing full batch gradient descent using the entire training set (not stochastic gradient

descent). Is it necessary to shuffle the training data? Explain your answer. (2pts).

No, it is not necessary because each frequency runs through all dataset and the order

don’t matter.

Question 2 (Architectures and training, 12 points):

A. Convolution:

(a) How many values will be generated if we forward propagate the image over the given

convolution kernel? (01pts)

9 values

(b) Calculate these values. (03pts)

109

108

110

Advertisement

92

85

74

72

74

79

(a) Consider the figure below (1pts):

(h=4,w=4,c=5)

B. Linearity (1 pts):

z = np.matmul(W, a_prev) + b = np.dot(W, a prev) + b

C. Convolutional neural network (04 pts):

Layer

Input

CONV3-8

Leaky ReLU

POOL-2

BATCHNORM

Advertisement

CONV3-16

Leaky ReLU

POOL-2

FLATTEN

FC-10

D. Training (02pts):

Activation Volume

Number of param

32 × 32 × 3

32 x 32 x 8

32 x 32 x 8

16 x 16 x 8

16 x 16 x 8

16 x 16 x 16

16 x 16 x 16

8 x 8 x 16

1688

Advertisement

10

0

8*(3x3x3 + 1) = 224

0

0

2*8

16*(3x3x8 + 1) = 1168

0

0

0

(8x8x16 + 1) * 10 = 10250

Yes he is right , because the loss function moves a lot when passing from type of image to

another that’s why optimization is so hard when using minibatch gradient descent