吴恩达深度学习笔记 course2 week3 测验

1. 第 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?

True

False   √

第 2 个问题
1
point

2. 第 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?

True

False                  √

第 3 个问题
1
point

3. 第 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 个问题
1
point

4. 第 4 个问题

If you think etaβ (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?

1
2
 
 
 
r = np.random.rand()
beta = r*0.09 + 0.9
 
 
 
1
2
 
 
 
r = np.random.rand()                 √
beta = 1-10**(- r - 1)
 
 
 
1
2
 
 
 
r = np.random.rand()
beta = 1-10**(- r + 1)
 
 
 
1
2
 
 
 
r = np.random.rand()
beta = r*0.9 + 0.09
 
 
 
第 5 个问题
1
point

5. 第 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?

True

False                        √

第 6 个问题
1
point

6. 第 6 个问题

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

W^{[l]}

b^{[l]}

z^{[l]}                 √

a^{[l]}

第 7 个问题
1
point

7. 第 7 个问题

In the normalization formula z_{norm}^{(i)} = frac{z^{(i)} - mu}{sqrt{sigma^2 + varepsilon}}znorm(i)=σ2+εz(i)μ, why do we use epsilon?

To speed up convergence

To have a more accurate normalization

In case muμ is too small

To avoid division by zero                             √

第 8 个问题
1
point

8. 第 8 个问题

Which of the following statements about gammaγ and etaβ in Batch Norm are true?

They can be learned using Adam, Gradient descent with momentum, or RMSprop, not just with gradient descent.                               √

The optimal values are gamma = sqrt{sigma^2 + varepsilon}γ=σ2+ε, and eta = muβ=μ.

They set the mean and variance of the linear variable z^[l]z[l] of a given layer.                                                        √

There is one global value of gamma in Reγℜ and one global value of eta in Reβℜ for each layer, and applies to all the hidden units in that layer.

etaβ and gammaγ are hyperparameters of the algorithm, which we tune via random sampling.

第 9 个问题
1
point

9. 第 9 个问题

After training a neural network with Batch Norm, at test time, to evaluate the neural network on a new example you should:

If you implemented Batch Norm on mini-batches of (say) 256 examples, then to evaluate on one test example, duplicate that example 256 times so that you’re working with a mini-batch the same size as during training.

Skip the step where you normalize using muμ and sigma^2σ2 since a single test example cannot be normalized.

Use the most recent mini-batch’s value of muμ and sigma^2σ2 to perform the needed normalizations.

Perform the needed normalizations, use muμ and sigma^2σ2 estimated using an exponentially weighted average across mini-batches seen during training.                              √

第 10 个问题
1
point

10. 第 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.                        √

Deep learning programming frameworks require cloud-based machines to run.

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

------------------------------------中文版-----------------------------------------------------------------------------------------

  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. 如果您认为β β (动量超参数)介于0.9和0.99之间,那么推荐采用以下哪一种方法来对β β 值进行取样?

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

    (博主注:β=110 r1  β=1−10−r−1 ,因为r 的取值只能在0到1之间,所以当r 等于0时,β=110 =10.1=0.9 β=1−10−1=1−0.1=0.9 ,当r 等于1时,β=110 =10.01=0.99 β=1−10−2=1−0.01=0.99 。)

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

    • 】 错误
    • 【 】 正确

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

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

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

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

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

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

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