Week 4 Quiz - Key concepts on Deep Neural Networks

Week 4 Quiz - Key concepts on Deep Neural Networks

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

    • It is used to cache the intermediate values of the cost function during training.
    • We use it to pass variables computed during forward 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.
    • We use it to pass variables computed during backward propagation to the corresponding forward propagation step. It contains useful values for forward propagation to compute activations.

    the “cache” records values from the forward propagation units and sends it to the backward propagation units because it is needed to compute the chain rule derivatives.

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

    • size of the hidden layers n[l]
    • learning rate α
    • number of iterations
    • number of layers L in the neural network

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

  3. Which of the following statements is true?

    • The deeper layers of a neural network are typically computing more complex features of the input than the earlier layers.
      Correct
    • The earlier layers of a neural network are typically computing more complex features of the input than the deeper layers.

    Note: You can check the lecture videos. I think Andrew used a CNN example to explain this.

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

    • True
    • False

    Note: We cannot avoid the for-loop iteration over the computations among layers.

  5. Assume we store the values for n^ [l] in an array called layers, as follows: layer_dims = [n_x, 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?

for i in range(1, len(layer_dims)):
    parameter['W' + str(i)] = np.random.randn(layer_dims[i], layer_dims[i - 1]) * 0.01
    parameter['b' + str(i)] = np.random.randn(layer_dims[i], 1) * 0.01
  1. Consider the following neural network.

    • The number of layers L is 4. The number of hidden layers is 3.

    Note: The input layer (L^ [0]) 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 hidden layers.

  2. During forward propagation, in the forward function for a layer l 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 l, since the gradient depends on it. True/False?

    • True
    • False

    During backpropagation you need to know which activation was used in the forward propagation to be able to compute the correct derivative.

  3. There are certain functions with 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?

    • True
    • False

    Note: See lectures, exactly same idea was explained.

  4. Consider the following 2 hidden layer neural network:

    Which of the following statements are True? (Check all that apply).

    • W^ [1] will have shape (4, 4)
    • b^ [1] will have shape (4, 1)
    • W^ [2] will have shape (3, 4)
    • b^ [2] will have shape (3, 1)
    • b^ [3] will have shape (1, 1)
    • W^ [3] will have shape (1, 3)

    Note: See this image for general formulas.

  5. Whereas the previous question used a specific network, in the general case what is the dimension of W^ [l], the weight matrix associated with layer l?

    • W^ [l] has shape (n^ [l],n^ [l−1])

    Note: See this image for general formulas.

no main manifest attribute, in quiz-0.0.1-SNAPSHOT.jar 是一个报错信息,表示在quiz-0.0.1-SNAPSHOT.jar包的清单文件(MANIFEST.MF)中缺少了主清单属性。 解决这个问题的方法是在pom文件中添加以下配置: ``` <build> <plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> </plugin> </plugins> </build> ``` 这个配置会在打包过程中自动生成并添加主清单属性,确保jar包能够正确运行。 同时,需要确保MANIFEST.MF文件夹和MANIFEST.MF文件位于项目的根目录下,才能够在本地使用java -jar命令运行jar包或在Docker容器中启动。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* [no main manifest attribute, in app-1.0-SNAPSHOT.jar](https://blog.csdn.net/YonJarLuo/article/details/128530264)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 33.333333333333336%"] - *2* [no main manifest attribute, in schoolspringboot-0.0.1-SNAPSHOT.jar](https://blog.csdn.net/weixin_52236586/article/details/131679246)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 33.333333333333336%"] - *3* [start-0.0.1-SNAPSHOT.jar](https://download.csdn.net/download/qq_38807606/12268407)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 33.333333333333336%"] [ .reference_list ]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值