Introduction:

This article is from deeplearning.ai’s deeplearning course test assignments, which will be translated gradually in the near future.

Translation: Huang Haiguang

Week 4:

Neural Networks and Deep Learning

Week 4 Quizs-Key Concepts on Deep Neural Networks

1.What is the “cache” used for in our implementation of forward propagation and backward propagation?   

(What is the “cache” used to implement forward and back propagation?)

【 】It is used to cache the intermediate values of the cost function during training.

【★】We use it to pass variables in computed during forward propagation to the corresponding backward propagation step Contains useful values for backward propagation to compute derivatives.(We use it to transmit variables computed in backward propagation to the corresponding backward propagation step. It contains useful values for backward propagation to compute derivatives.)

【 】It is used to keep track of the hyperparameters that we are searching over, to speed up computation. To accelerate the calculation.)

【 】We use it to pass variables computed during backward propagation to the corresponding forward propagation step Contains useful values for forward propagation to compute Activations. It contains useful values for calculating the forward propagation of activation.

Note: The “cache” records values from the forward Propagation units and sends it to the backward propagation units because it It is needed to compute the chain rule derivatives.(Note that “cache” records values from the forward propagation unit and sends them to the back propagation unit because derivatives are computed by chain.)

2. Among the following, which ones are “hyperparameters”? (Check all that apply.) I only list correct options.

(Which of the following are “hyperparameters”? Only correct options are listed)

【★】 Size of the hidden layers

【★】 Learning rate α

[★] Number of iterations

【★】 The number of layers in the neural network

Note: You can check this Quora post orthis blog post.

3. Which of the following statements is true? (Which of the following statements is true?)

【★】The deeper layers of a neural network are often deployed to task The deeper layers of a neural network usually compute more complex input features than the previous

【 】 Often The task must be carried to task by task and task The front layers of neural networks usually compute more complex input features than deeper

Note: You can check the lecture videos. I think Andrew used a CNN example to explain this. You can check out the video, I want to use Ng’s CNN example to explain this.)

4. Vectorization allows you to compute forward propagation in an -layer neural network without an explicit for-loop (or Any other explicit iterative loop) over the layers l=1, 2,… ,L. True/False?

Vectorization allows you to compute forward propagation in layer neural networks without the need for forward propagation in layers (l = 1,2… L) explicitly use for-loop (or any other explicit iterative loop), correct?

【 】 True, True, True

【★】 False

The for-loop iteration is the largest one representing the computations among layers. Each iteration consists of the largest one representing the computations.

5. Assume we store the values for in an array called layers, as follows: Layer_dims = [, 4,3,2,1]. So layer 1 has four hidden units, layer 2 has 3 hidden units and so on. Which of the following for-loops will allow you to initialize the parameters for the model?

(suppose we store the values in an array called layers, as follows: layer_dims = [, 4,3,2,1]. Thus, level 1 has four hidden units, level 2 has three hidden units, and so on. Which for loop can you use to initialize model parameters?

for(i in range(1.len(layer_dims)) : parameter[' W '+ STR (I)] = Np.random. Randn (layers[I], layers[I -1)) *0.01 'parameter[' b' + STR (I)] = np.random. Randn (layers[I], 1) * 0.01Copy the code

6. Consider the following neural network.

(The following statement about neural networks is true: only the correct options are listed)

【★】The number of layers is 4. The number of layers is 3.

Note: The input layer () does not count.

As seen in lecture, the number of layers is counted as the number of hidden layers + 1. The input and output layers are not counted as As you can see in the video, the number of layers is counted as the number of hidden layers +1. Input layer and output layer are excluded as hidden layer.

7. During forward propagation, in the forward function for a layer   you need to know what is the activation function in a layer (Sigmoid, tanh, ReLU, etc.). During backpropagation, the corresponding backward function also needs to know what is the activation function for layer  , since the gradient depends on it. True/False?

(During forward propagation, in the forward propagation function of the layer, you need to know what the activation function (Sigmoid, TANh, ReLU, etc.) in the layer is, and during back propagation, the corresponding back propagation function also needs to know what the activation function of the layer is, because the gradient is calculated from it, right?)

【★】 True

【 】False

Note: During backpropagation you need to know which activation was used in the forward propagation to be able to compute the (Note: During backpropagation, you need to know which activation function is used in forward propagation to calculate the correct derivative.)

8.There are certain functions with the following properties:

Some functions have the following properties:

(i) To compute the function using a shallow network circuit, you will need a large network (where we measure size by the number of logic gates in the network), but (ii) To compute it using a deep network circuit, you need only an exponentially smaller network. True/False? (I) using a shallow network circuit to compute a function requires a large network (we measure the size by the number of logic gates in the network), but (ii) using a deep network circuit to compute it requires only a network with a smaller exponential. True/false?)

【★】True

【 】False

Note: See lectures, exactly the same idea was explained.

9. Consider the following 2 hidden layer neural network: Which of the following statements are True? (Check all that apply).

Which of the following statements is true in a two-layer hidden neural network? Only correct options are listed))

【★】 Will have shape (4, 4)

【★】 Will have shape (4, 1)

【★】 Will have shape (3, 4)

【★】 Will have shape (3, 1)

【★】 Will have shape (1, 1)

【★】 Will have shape (1, 3)

Note: See [this image] for general formulas.

10. Whereas the previous question used a specific network, in the general case what is the dimension of   , the weight matrix associated with layer  ?

(The previous question uses a specific network, what is the dimension of the weight matrix related to layer LL in general, and only lists the correct options)

【★】 Has shape (,)

Note: See this imagefor general formulas.

Note: the menu of the official account includes an AI cheat sheet, which is very suitable for learning on the commute.

Highlights from the past2019Machine learning Online Manual Deep Learning online Manual AI Basic Download (Part I) note: To join our wechat group or QQ group, please reply "add group" to join knowledge planet (4500+ user ID:92416895), please reply to knowledge PlanetCopy the code

Like articles, click Looking at the