【深度学习】吴恩达深度学习-Course2改善深层神经网络:超参数调试、正则化以及优化-第一周深度学习的使用层面作业

视频链接:【中英字幕】吴恩达深度学习课程第二课 — 改善深层神经网络:超参数调试、正则化以及优化
参考链接:

  1. 【中英】【吴恩达课后测验】Course 2 - 改善深层神经网络 - 第一周测验
  2. 2020-7-22 吴恩达-改善深层NN-w1 深度学习的实用层面(课后作业)

中文习题

1.如果你有10,000,000个样本,你会如何划分训练/验证/测试集?
A. 33% 训练集. 33% 验证集. 33% 测试集
B. 60% 训练集. 20% 验证集. 20% 测试集
C. 98% 训练集. 1% 验证集. 1% 测试集


2. 开发集和测试集应该
A.来自同一分布
B.来自不同分布
C.彼此间相互独立(与(x,y)对同理)
D.有相同数量的样本


3.如果你的神经网络模型表现出了高方差,下面哪个方法是你会去尝试的?
A.添加正则化项
B.获取更多的测试集数据
C.增加每一个隐藏层的神经单元
D.让神经网络变得更深
E.获得更多的训练数据


4.你在超市的自助结账亭工作, 并且你正在为苹果、香蕉、橘子做分类器.假设你的分类器包括0.5%的训练误差和7%的验证误差。你会对你的分类器做以下哪些操作 (Check all that apply.)
A.增加正则化参数lambda
B.减少正则化参数lambda
C.获得更多训练数据
D.使用一个大的神经网络


5. 什么是权重衰减
A.正则化技术 (如L2正则表达式) 导致梯度下降在每次迭代时权重收缩
B.在训练中逐步降低学习率的过程
C.如果对噪声数据进行训练,则神经网络中的权重会逐渐损坏
D.通过对权重值施加上限来避免渐变消失的技术


6.当你增加正则化参数lambda时会发生什么?
A.权重变得更小 (接近0)
B.权重变得更大 (远离0)
C.将lambda增加一倍导致权重增加一倍
D.梯度下降每一步变得更大(与λ成比例)


7.使用反向随机失活(inverted dropout),在测试时候
A.你应用dropout(反向随机失活),并且在训练中的计算中不保留1/keep_prob因子
B.你应用dropout(反向随机失活),但在计算中保留1/keep_prob因子
C.你不应用dropout(反向随机失活),但在计算中保留1/keep_prob因子
D.你不应用dropout(反向随机失活),并且在训练中的计算中不保留1/keep_prob因子


8.增加参数keep_prob从0.5到0.6会导致
A.增加了正则化效应
B.减少了正则化效应
C.导致神经网络以较高的训练差错结束
D.导致神经网络以较低的训练差错结束


9.哪些技术可以减少方差,减少过拟合
A.Xavier初始化
B.Dropout
C.梯度检查
D.梯度爆炸
E.L2正则化
F.梯度消失
G.数据扩充


10.为什么我们要归一化输入x?
A.使参数初始化速度加快
B.它使成本函数能够更快地优化
C.规范化是规范化的另一个词——它有助于减少差异
D.它使数据更容易可视化。

英文习题

1.If you have 10,000,000 examples, how would you split the train/dev/test set?
A. 33% train . 33% dev . 33% test
B. 60% train . 20% dev . 20% test
C. 98% train . 1% dev . 1% test

2.The dev and test set should:
A.Come from the same distribution
B.Come from the different distribution
C.Be indentical to each other(same (x,y) pairs)
D.Have the same number of examples


3.If your Neural Network model seems to have high variance, what of the following would be promising things to try?
A.Add regularization
B.Get more test data
C.Increase the number of units in each hidden layer
D.Make the NN deeper
E.Get more training data


4.You are working on an automated check-out kiosk for a supermarket, and are building a classifier for apples, bananas and oranges. Suppose your classifier obtains a training set error of 0.5%, and a dev set error of 7%. Which of the following are promising things to try to improve your classifier? (Check all that apply.)
A.Increase the regularization parameter lambda
B.Decrease the regularization parameter lambda
C.Get more training data
D.Use a bigger NN


5.What is weight decay?
A.A regularization technique (such as L2 regularization) that results in gradient descent shrinking the weights on every iteration.
B.The process of gradually decreasing the learning rate during training.
C.Gradual corruption of the weights in the NN if it is trained on noisy data.
D.A technique to avoid vanishing gradient by imposing a ceiling on the values of the weights


6.What happens when you increase the regularization hyperparameter lambda?
A.Weights are pushed toward becoming smaller (closer to 0)
B.Weights are pushed toward becoming bigger (further from 0)
C.Doubling lambda should roughly result in doubling the weights
D.Gradient descent taking bigger steps with each iteration (proportional to lambda)


7.With the inverted dropout technique, at test time:
A.You apply dropout (randomly eliminate units) and do not keep the 1/keep_prob factor in the calculations used in training
B.You apply dropout (randomly eliminate units) but keep the 1/keep_prob factor in the calculations used in training
C.You do not apply dropout (do not randomly eliminate units) but keep the 1/keep_prob factor in the calculations used in training
D.You do not apply dropout (do not randomly eliminate units) and do not keep the 1/keep_prob factor in the calculations used in training


8.Increasing the parameter keep_prob from (say) 0.5 to 0.6 will likely cause the following: (Check the two that apply)
A.Increasing the regularization effect
B.Reducing the regularization effect
C.Causing the neural network to end up with a higher training set error
D.Causing the neural network to end up with a lower training set error


9.Which of these techniques are useful for reducing variance (reducing overfitting)? (Check all that apply.)
A.Xavier初始化
B.Dropout
C.Gradient Checking
D.Exploding gradient
E.L2 regularization
F.Vanishing gradient
G.Data augmentation


10.Why do we normalize the inputs x?
A.It makes the parameter initialization faster
B.It makes the cost function faster to optimize
C.Normalization is another word for regularization–It helps to reduce variance
D.It makes it easier to visualize the data.

参考答案&个人理解

  1. C。选项A,显然非常的不合理,通常不会将训练集、验证集、测试集平均地分布。在小数据时代(数据集为100、1000、10000条),划分方法可以为B。在如今大数据时代,验证集和测试集占数据总量比例会趋向更小,而提高训练集的数量。
  2. A。课程内容里,吴恩达教授举过一个例子:也许你的Training sets是从网络上抓取下来的高清的猫图片,而Dev sets和test sets是来自用户上传的图片,也许只是随手一拍。在这样的情况下,我们通过training sets训练的模型可能并不适用于这些dev sets和test sets。对于这种情况我们希望确保验证集和测试集的数据来自同一分布。
  3. AE。根据上课所讲的内容,在高方差时候,我们通常会:①采用更多数据进行训练;②添加正则化项;③使用更好的神经网络框架。而在高偏差的情况下,我们通常会:①选择新的神经网络(规模更大的神经网络通常会有帮助);②花费更多的时间来训练或尝试使用更先进的优化算法。高方差的具体表现为过度的拟合(更细地说,这样的情况在训练集的错误率会低,而在验证集、测试集的错误率与训练集的相差较大),高偏差表现为并未拟合数据(表现为训练集的错误率会比较高)
  4. AC 。0.5%的训练集错误率说明曲线拟合的很好,但训练集错误率与验证集错误率相差之大说明出现了过拟合的情况,过拟合便是高方差。则调整高方差的方式是:①采用更多数据进行训练;②添加正则化项;③采用更好的神经网络框架。
  5. A。通过正则化可以避免数据权值矩阵过大,预防权重过大。
  6. A。如果正则化参数lambda设置得足够大,那么权重矩阵W就会被设置为接近于0。
  7. C。测试时候不需要再使用dropout。
  8. BD。keep_prob越大,保留的神经元越多,那正则化的效果越小。
  9. BEG
  10. B。归一化输入就是使得整个数据集变得更加均衡,不至于梯度下降需要用较小的学习率进行多次迭代。在归一化输入后,我们可以使用更大的步长来进行梯度下降(从而速度就增快了)
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值