【中英】【吴恩达课后测验】Course 2 - 改善深层神经网络 - 第三周测验


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


第3周测验 - 超参数调整,批量标准化,编程框架

  1. 如果在大量的超参数中搜索最佳的参数值,那么应该尝试在网格中搜索而不是使用随机值,以便更系统的搜索,而不是依靠运气,请问这句话是正确的吗?

    • 】 错误
    • 【 】 正确

    请注意:应当尝试随机值,不要使用网格搜索,因为你不知道哪些超参数比其他的更重要。

    And to take an extreme example, let's say that hyperparameter two was that value epsilon that you have in the denominator of the Adam algorithm. So your choice of alpha matters a lot and your choice of epsilon hardly matters.



    举一个很极端的例子,就比如在Adam算法中防止除零操作的ε的值,一般为1的负8次方,但是和学习率α相比,ε就显得不那么重要了。

  2. 每个超参数如果设置得不好,都会对训练产生巨大的负面影响,因此所有的超参数都要调整好,请问这是正确的吗?

    • 】 错误
    • 【 】 正确

    We've seen in lecture that some hyperparameters, such as the learning rate, are more critical than others.



    我们在视频中讲到的比如学习率这个超参数比其他的超参数更加重要。

  3. 在超参数搜索过程中,你尝试只照顾一个模型(使用熊猫策略)还是一起训练大量的模型(鱼子酱策略)在很大程度上取决于:

    • 【 】 是否使用批量(batch)或小批量优化(mini-batch optimization)
    • 【 】 神经网络中局部最小值(鞍点)的存在性
    • 】 在你能力范围内,你能够拥有多大的计算能力(博主注:就是高性能电脑和低性能电脑的区别)
    • 【 】 需要调整的超参数的数量
  4. 如果您认为\(\beta\)(动量超参数)介于0.9和0.99之间,那么推荐采用以下哪一种方法来对\(\beta\)值进行取样?

    r = np.random.rand()
    beta = 1 - 10 ** ( - r - 1 )

    (博主注:\(\beta = 1 - 10^{-r-1}\),因为\(r\)的取值只能在0到1之间,所以当\(r\)等于0时,\(\beta=1 - 10^{-1} = 1 - 0.1 = 0.9\),当\(r\)等于1时,\(\beta=1 - 10^{-2} = 1 - 0.01 = 0.99\)。)

  5. 找到好的超参数的值是非常耗时的,所以通常情况下你应该在项目开始时做一次,并尝试找到非常好的超参数,这样你就不必再次重新调整它们。请问这正确吗?

    • 】 错误
    • 【 】 正确

    请注意:模型中的细微变化可能导致您需要从头开始重新找到好的超参数。

  6. 在视频中介绍的批量标准化中,如果将其应用于神经网络的第\(l\)层,那么您怎样进行标准化?

    • 】 \(z^{[l]}\)
  7. 在标准化公式中,为什么要使用epsilon(\(\epsilon\))?

    • 】 为了避免除零操作
  8. 批处理规范中关于 \(γ\) 和 \(β\) 的以下哪些陈述是正确的?(博主注:只列出了正确选项)

    • 】它们可以在Adam、具有动量的梯度下降或RMSprop使中用,而不仅仅是用梯度下降来学习。
    • 】它们设定给定层的线性变量 $z^{[l]} $ 的均值和方差。
  9. 在训练具有批处理规范的神经网络之后,在测试时间,在新样本上评估神经网络,您应该:

    • 】执行所需的标准化,在训练期间使用使用了\(μ\)和\(σ^2\)的指数加权平均值来估计mini-batches的情况。
  10. 关于深度学习编程框架的这些陈述中,哪一个是正确的?

    • 】 通过编程框架,您可以使用比低级语言(如Python)更少的代码来编写深度学习算法。
    • 】 即使一个项目目前是开源的,项目的良好管理有助于确保它即使在长期内仍然保持开放,而不是仅仅为了一个公司而关闭或修改。
    • 【 】 深度学习编程框架的运行需要基于云的机器。

Week 3 Quiz - Hyperparameter tuning, Batch Normalization, Programming Frameworks

  1. If searching among a large number of hyperparameters, you should try values in a grid rather than random values, so that you can carry out the search more systematically and not rely on chance. True or False?

    • False
    • True

    Note: Try random values, don't do grid search. Because you don't know which hyperparamerters are more important than others.

    And to take an extreme example, let's say that hyperparameter two was that value epsilon that you have in the denominator of the Adam algorithm. So your choice of alpha matters a lot and your choice of epsilon hardly matters.

  2. Every hyperparameter, if set poorly, can have a huge negative impact on training, and so all hyperparameters are about equally important to tune well. True or False?

    • False
    • True

    We've seen in lecture that some hyperparameters, such as the learning rate, are more critical than others.

  3. During hyperparameter search, whether you try to babysit one model (“Panda” strategy) or train a lot of models in parallel (“Caviar”) is largely determined by:

    • Whether you use batch or mini-batch optimization
    • The presence of local minima (and saddle points) in your neural network
    • The amount of computational power you can access
    • The number of hyperparameters you have to tune
  4. If you think β (hyperparameter for momentum) is between on 0.9 and 0.99, which of the following is the recommended way to sample a value for beta?

    r = np.random.rand()
    beta = 1 - 10 ** (-r - 1)
  5. Finding good hyperparameter values is very time-consuming. So typically you should do it once at the start of the project, and try to find very good hyperparameters so that you don’t ever have to revisit tuning them again. True or false?

    • False
    • True

    Note: Minor changes in your model could potentially need you to find good hyperparameters again from scratch.

  6. In batch normalization as presented in the videos, if you apply it on the lth layer of your neural network, what are you normalizing?

  7. In the normalization formula, why do we use epsilon?

    • To avoid division by zero
  8. Which of the following statements about γ and β in Batch Norm are true? Only correct options listed

    • They can be learned using Adam, Gradient descent with momentum, or RMSprop, not just with gradient descent.
    • They set the mean and variance of the linear variable z[2] of a given layer.
  9. After training a neural network with Batch Norm, at test time, to evaluate the neural network on a new example you should:

    • Perform the needed normalizations, use μ and σ^2 estimated using an exponentially weighted average across mini-batches seen during training.
  10. Which of these statements about deep learning programming frameworks are true? (Check all that apply)

    • A programming framework allows you to code up deep learning algorithms with typically fewer lines of code than a lower-level language such as Python.
    • Even if a project is currently open source, good governance of the project helps ensure that the it remains open even in the long term, rather than become closed or modified to benefit only one company.
    • Deep learning programming frameworks require cloud-based machines to run.

  1. l

  2. l

【中英】【吴恩达课后测验】Course 2 - 改善深层神经网络 - 第三周测验的更多相关文章

  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. 【吴恩达课后编程作业】第二周作业 - Logistic回归-识别猫的图片

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

  9. 吴恩达课后作业学习1-week2-homework-logistic

    参考:https://blog.csdn.net/u013733326/article/details/79639509 希望大家直接到上面的网址去查看代码,下面是本人的笔记 搭建一个能够 “识别猫” ...

  10. 吴恩达课后作业学习1-week3-homework-one-hidden-layer

    参考:https://blog.csdn.net/u013733326/article/details/79702148 希望大家直接到上面的网址去查看代码,下面是本人的笔记 建立一个带有隐藏层的神经 ...

随机推荐

  1. 【Unit1】表达式化简(层次化设计)-作业总结

    三次作业围绕表达式化简展开,逐次递进.主体思路为:递归下降解析表达式保存至类中,依据相关模式化简,依照规范输出字符串. 1.第一次作业 1.1 题目概述 表达式 = 项 + 项 + ... 项 = 因 ...

  2. 记录一次关于使用leaflet draw 插件叠加图层删除绘制层无法删除的问题

    问题描述 业务逻辑是这样的:再地图上已经绘制了一个多边形区域,然后需要再绘制的区域下再绘制下级区域,使用插件可以正常绘制并保存绘制数据,然后再回显编辑的时候,此时地图展示了上级多边形区域(该区域未追加 ...

  3. rust学习笔记(7)

    crate 中文是货箱,这是我们编写自己的库或者程序的方式 库 使用rustc可以把一个文件编译为lib rustc --crate-type=lib rary.rs 构建的方式选择lib 编译出来的 ...

  4. grpc unable to determine Go import path for

    前言 在 proto 文件夹下执行如下命令: $ protoc --go_out=plugins=grpc:. *.proto 报错:无法确定Go导入路径 protoc-gen-go: unable ...

  5. go实现协程池管理

    使用channel实现协程池 通过 Channel 实现 Goroutine Pool,缺点是会造成协程的频繁开辟和注销,但好在简单灵活通用. package main import ( " ...

  6. PIL或Pillow学习2

    接着学习下Pillow常用方法: PIL_test1.py : ''' 9, Pillow图像降噪处理 由于成像设备.传输媒介等因素的影响,图像总会或多或少的存在一些不必要的干扰信息,我们将这些干扰信 ...

  7. 编写你的第一个 Django 应用程序,第4部分

    本教程从教程 3 停止的地方开始.我们是 继续民意调查应用程序,并将专注于表单处理和 减少我们的代码. 一.编写最小表单 让我们更新上一个教程的投票详细信息模板("polls/detail. ...

  8. SpringBoot+Nginx大文件传输

    Nginx配置 # 公众端的附件上传 location /api/visitor/upload { # Pass altered request body to this location uploa ...

  9. 一文速通Python并行计算:04 Python多线程编程-多线程同步(上)—基于条件变量、事件和屏障

    一文速通 Python 并行计算:04 Python 多线程编程-多线程同步(下)-基于条件变量.事件和屏障 摘要: 本文介绍了 Python 多线程同步的三种机制:条件变量(Condition).事 ...

  10. 【Linux】3.11 包管理工具(RPM和YUM)

    包管理工具 1. RPM包 RPM:RedHat Package Manager,红帽软件包管理工具. Linuxd分发版本都有采用(suse,redhat,centos等) 1.1 rpm指令 1. ...