【中英】【吴恩达课后测验】Course 1 - 神经网络和深度学习 - 第四周测验


上一篇:【课程1 - 第三周编程作业】※※※※※ 【回到目录】※※※※※下一篇:【课程1 - 第四周编程作业】


第4周测验-深度神经网络的关键概念

  1. 在实现前向传播和反向传播中使用的“cache”是什么?

    • 【 】用于在训练期间缓存成本函数的中间值。
    • 】 我们用它传递前向传播中计算的变量到相应的反向传播步骤,它包含用于计算导数的反向传播的有用值。
    • 【 】它用于跟踪我们正在搜索的超参数,以加速计算。
    • 【 】 我们使用它将向后传播计算的变量传递给相应的正向传播步骤,它包含用于计算计算激活的正向传播的有用值。

    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.



    “cache”记录来自正向传播单元的值并将其发送到反向传播单元,因为需要链式计算导数。

  2. 以下哪些是“超参数”?

    • 】隐藏层的大小\(n^{[l]}\)
    • 】学习率α
    • 】迭代次数
    • 】神经网络中的层数L

    博主注:我只列出了正确选项。

    请注意:你可以查看Quora的这篇文章 或者 这篇博客.

  3. 下列哪个说法是正确的?

    • 】 神经网络的更深层通常比前面的层计算更复杂的输入特征。
    • 【 】神经网络的前面的层通常比更深层计算输入的更复杂的特性。

    注意:您可以查看视频,我想用吴恩达的用美国有线电视新闻网的例子来解释这个。

  4. 向量化允许您在L层神经网络中计算前向传播,而不需要在层(l = 1,2,...,L)上显式的使用for-loop(或任何其他显式迭代循环),正确吗?

    • 【 】正确
    • 】 错误

    请注意:在层间计算中,我们不能避免for循环迭代。

    博主注:请想一下输入的迭代次数的参数,在模型内部是用什么实现的?

  5. 假设我们将\(n ^ {[l]}\)的值存储在名为layers的数组中,如下所示:layer_dims = [n_x,4,3,2,1]。 因此,第1层有四个隐藏单元,第2层有三个隐藏单元,依此类推。 您可以使用哪个for循环初始化模型参数?

    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.01
  6. 下面关于神经网络的说法正确的是:.

    • 】层数L为4,隐藏层数为3。

    注意:输入层(\(L ^ {[0]}\))不计数。

    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.



    正如视频中所看到的那样,层数被计为隐藏层数+1。输入层和输出层不计为隐藏层。

  7. 在前向传播期间,在层\(l\)的前向传播函数中,您需要知道层\(l\)中的激活函数(Sigmoid,tanh,ReLU等)是什么, 在反向传播期间,相应的反向传播函数也需要知道第\(l\)层的激活函数是什么,因为梯度是根据它来计算的,正确吗?

    • 】 正确
    • 【 】错误

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



    在反向传播期间,您需要知道正向传播中使用哪种激活函数才能计算正确的导数。

  8. 有一些功能具有以下属性:

    (i) 使用浅网络电路计算函数时,需要一个大网络(我们通过网络中的逻辑门数量来度量大小),但是(ii)使用深网络电路来计算它,只需要一个指数较小的网络。真/假?

    • 】 正确
    • 【 】错误

    请注意:参见视频,完全相同的题。

    博主注:没有读懂题,直接机器翻译,你可以在下面的英文原版自己读一下。

  9. 在2层隐层神经网络中,下列哪个说法是正确的?

    • 】\(W^{[1]}\) 的维度为 (4, 4)
    • 】\(b^{[1]}\) 的维度为 (4, 1)
    • 】\(W^{[2]}\)的维度为 (3, 4)
    • 】\(b^{[2]}\) 的维度为 (3, 1)
    • 】\(b^{[3]}\) 的维度为 (1, 1)
    • 】\(W^{[3]}\)的维度为 (1, 3)

    请注意:请参阅图片

    博主注:找不到图片23333333。

  10. 前面的问题使用了一个特定的网络,与层\(l\)有关的权重矩阵在一般情况下,\(W ^ {[1]}\)的维数是多少

    • $W^{[l]} \(的维度是 (\)n{[l]}$,$n$)

请注意:请参阅图片


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[1] 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(layers[i], layers[i - 1])) * 0.01
    parameter[‘b’ + str(i)] = np.random.randn(layers[i], 1) * 0.01
  6. Consider the following neural network.

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

    Note: The input layer (L[2]) 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.

  7. 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.

  8. 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.

  9. Consider the following 2 hidden layer neural network:

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

    • W[3] will have shape (4, 4)
    • b[4] will have shape (4, 1)
    • W[5] will have shape (3, 4)
    • b[6] will have shape (3, 1)
    • b[7] will have shape (1, 1)
    • W[8] 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 W[9], the weight matrix associated with layer l?

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

    Note: See this image for general formulas.


  1. l

  2. 0

  3. 1

  4. 1

  5. 2

  6. 2

  7. 3

  8. 3

  9. l

  10. l

【中英】【吴恩达课后测验】Course 1 - 神经网络和深度学习 - 第四周测验的更多相关文章

  1. 【吴恩达课后测验】Course 1 - 神经网络和深度学习 - 第二周测验【中英】

    [中英][吴恩达课后测验]Course 1 - 神经网络和深度学习 - 第二周测验 第2周测验 - 神经网络基础 神经元节点计算什么? [ ]神经元节点先计算激活函数,再计算线性函数(z = Wx + ...

  2. 【吴恩达课后测验】Course 1 - 神经网络和深度学习 - 第一周测验【中英】

    [吴恩达课后测验]Course 1 - 神经网络和深度学习 - 第一周测验[中英] 第一周测验 - 深度学习简介 和“AI是新电力”相类似的说法是什么? [  ]AI为我们的家庭和办公室的个人设备供电 ...

  3. 【中文】【deplearning.ai】【吴恩达课后作业目录】

    [目录][吴恩达课后作业目录] 吴恩达深度学习相关资源下载地址(蓝奏云) 课程 周数 名称 类型 语言 地址 课程1 - 神经网络和深度学习 第1周 深度学习简介 测验 中英 传送门 无编程作业 编程 ...

  4. 吴恩达课后作业学习1-week4-homework-two-hidden-layer -1

    参考:https://blog.csdn.net/u013733326/article/details/79767169 希望大家直接到上面的网址去查看代码,下面是本人的笔记 两层神经网络,和吴恩达课 ...

  5. 吴恩达课后作业学习1-week4-homework-multi-hidden-layer -2

    参考:https://blog.csdn.net/u013733326/article/details/79767169 希望大家直接到上面的网址去查看代码,下面是本人的笔记 实现多层神经网络 1.准 ...

  6. 吴恩达课后作业学习2-week1-1 初始化

    参考:https://blog.csdn.net/u013733326/article/details/79847918 希望大家直接到上面的网址去查看代码,下面是本人的笔记 初始化.正则化.梯度校验 ...

  7. 吴恩达课后作业学习2-week1-2正则化

    参考:https://blog.csdn.net/u013733326/article/details/79847918 希望大家直接到上面的网址去查看代码,下面是本人的笔记 4.正则化 1)加载数据 ...

  8. 吴恩达老师机器学习课程chapter04——神经网络

    吴恩达老师机器学习课程chapter04--神经网络 本文是非计算机专业新手的自学笔记,高手勿喷,欢迎指正与其他任何合理交流. 本文仅作速查备忘之用,对应吴恩达(AndrewNg)老师的机器学期课程第 ...

  9. 【吴恩达课后编程作业】第二周作业 - Logistic回归-识别猫的图片

    1.问题描述 有209张图片作为训练集,50张图片作为测试集,图片中有的是猫的图片,有的不是.每张图片的像素大小为64*64 吴恩达并没有把原始的图片提供给我们 而是把这两个图片集转换成两个.h5文件 ...

  10. 吴恩达课后作业学习2-week3-tensorflow learning-1-基本概念

    参考:https://blog.csdn.net/u013733326/article/details/79971488 希望大家直接到上面的网址去查看代码,下面是本人的笔记  到目前为止,我们一直在 ...

随机推荐

  1. Laravel11 从0开发 Swoole-Reverb 扩展包(一) - 扩展包开发

    前言 大家好呀,我是yangyang.好久没更新了,最近新项目在使用laravel11(截止目前发文,laravel12也发布了)做开发,自己也是利用有些空闲时间做些除开业务以外的深入学习,因此也就萌 ...

  2. 玩three.js的一点心得

    契机: 3-4月份,有机会再次学了一遍高数,然后再一次从二,三重积分的坑里爬来爬去,其中有个直观的问题一直困扰着我就是一个函数在空间坐标系上的图像,所以当时就打算学完这些之后,自己在5月份的时候用th ...

  3. Django实战项目-学习任务系统-需求说明

    一,需求说明 在我最近的阅读中,我深深被一些关于智能或系统的小说吸引.这些小说的主角意外获得某种神秘的智能或系统,然后通过完成系统发布的各种任务,逐渐提升自己的知识和能力.即使是普通的屌丝,也能在系统 ...

  4. 记一次Linux虚拟机分配内存不足的处理方案

    记一次Linux虚拟机硬盘空间不足的处理方案 **起因:**公司的服务器是windows的,而我需要一个基于Linux的dev环境,于是用vmvare创建了一个centos7的系统实例,里面安装mys ...

  5. 实现领域驱动设计 - 使用ABP框架 - 聚合

    这是本指南的关键部分.我们将通过实例介绍和解释一些明确的规则.在实现领域驱动设计时,您可以遵循这些规则并将其应用到您的解决方案中 领域案例 这些例子将使用GitHub中使用的一些概念,比如Issue, ...

  6. 【JVM之内存与垃圾回收篇】垃圾回收相关算法

    垃圾回收相关算法 标记阶段:引用计数算法 在堆里存放着几乎所有的 Java 对象实例,在 GC 执行垃圾回收之前,首先需要区分出内存中哪些是存活对象,哪些是已经死亡的对象.只有被标记为己经死亡的对象, ...

  7. Nginx 301永久性转移

    我有个域名www.taadis.com, 想永久性转移到taadis.com. 前言 看到很多网友的做法是把taadis.com & www.taadis.com等多个域名放到一个server ...

  8. Try .NET & Github Gist

    Try .NET Try .NET 是微软最近推出的在线 C# 运行环境,不用安装 Visual Studio 等,就可以直接上手写 C# 代码. 可以先进来写两行代码看看 https://try.d ...

  9. cannot resolve unit......

    Just disable Error Insight (Tools -> Options -> Editor Options -> Code Insight, uncheck Err ...

  10. Unbuntu16搭建Kafka环境总结

    1.安装Kafka 环境说明 OS:Ubuntu 16.04 Zookeeper:zookeeper 3.4.5 Kafka:kafka_2.11-0.11.0.0 jdk:jdk8(Kafka启动需 ...