吴恩达《深度学习》-课后测验-第一门课 (Neural Networks and Deep Learning)-Week 2 - Neural Network Basics(第二周测验 - 神经网络基础)
Week 2 Quiz - Neural Network Basics(第二周测验 - 神经网络基础)
1. What does a neuron compute?(神经元节点计算什么?)
【 】 A neuron computes an activation function followed by a linear function (z = Wx + b)(神经 元节点先计算激活函数,再计算线性函数(z = Wx + b))
【 】 A neuron computes a linear function (z = Wx + b) followed by an activation function(神经 元节点先计算线性函数(z = Wx + b),再计算激活。)
【 】 A neuron computes a function g that scales the input x linearly (Wx + b)(神经元节点计算 函数 g,函数 g 计算(Wx + b))
【 】 A neuron computes the mean of all features before applying the output to an activation function(在 将输出应用于激活函数之前,神经元节点计算所有特征的平均值)
答案
【【★】 A neuron computes a linear function (z = Wx + b) followed by an activation function(神经 元节点先计算线性函数(z = Wx + b),再计算激活。)
Note: The output of a neuron is a = g(Wx + b) where g is the activation function (sigmoid, tanh, ReLU, …).(注:神经元的输出是 a = g(Wx + b),其中 g 是激活函数(sigmoid,tanh, ReLU,…))
\2. Which of these is the “Logistic Loss”?(下面哪一个是 Logistic 损失?)
【 】损失函数:\(L(\hat{y}^{(i)},y^{(i)})=-y^{(i)}log\hat{y}^{(i)}-(1-y^{(i)})log(1-\hat{y}^{(i)})\)
Note: We are using a cross-entropy loss function.(注:我们使用交叉熵损失函数。)
\3. Suppose img is a (32,32,3) array, representing a 32x32 image with 3 color channels red, green and blue. How do you reshape this into a column vector?(假设 img 是一个(32,32,3) 数组,具有 3 个颜色通道:红色、绿色和蓝色的 32x32 像素的图像。 如何将其重新转换为 列向量?)
答案
x = img.reshape((32 * 32 * 3, 1))
\4. Consider the two following random arrays “a” and “b”:(看一下下面的这两个随机数组“a”和 “b”:)
a = np.random.randn(2, 3) # a.shape = (2, 3)
b = np.random.randn(2, 1) # b.shape = (2, 1)
c = a + b
What will be the shape of “c”?(请问数组 c 的维度是多少?)
答案
c.shape = (2, 3)
b (column vector) is copied 3 times so that it can be summed to each column of a.
Therefore, c.shape = (2, 3).( B(列向量)复制 3 次,以便它可以和 A 的每一列相加,所
以:c.shape = (2, 3))
\5. Consider the two following random arrays “a” and “b”:(看一下下面的这两个随机数组“a”和 “b”)
a = np.random.randn(4, 3) # a.shape = (4, 3)
b = np.random.randn(3, 2) # b.shape = (3, 2)
c = a * b
What will be the shape of “c”?(请问数组“c”的维度是多少?)
答案
The computation cannot happen because the sizes don’t match. It’s going to be “error”!
Note:“*” operator indicates element-wise multiplication. Element-wise multiplication requires same
dimension between two matrices. It’s going to be an error.(注:运算符 “*” 说明了按元素乘法来相
乘,但是元素乘法需要两个矩阵之间的维数相同,所以这将报错,无法计算。)
\6. Suppose you have
吴恩达《深度学习》-课后测验-第一门课 (Neural Networks and Deep Learning)-Week 2 - Neural Network Basics(第二周测验 - 神经网络基础)的更多相关文章
- 吴恩达深度学习课后习题第5课第1周第3小节: Jazz Improvisation with LSTM
目录 Improvise a Jazz Solo with an LSTM Network Packages 1 - Problem Statement 1.1 - Dataset What are ...
- 【Deeplearning.ai 】吴恩达深度学习笔记及课后作业目录
吴恩达深度学习课程的课堂笔记以及课后作业 代码下载:https://github.com/douzujun/Deep-Learning-Coursera 吴恩达推荐笔记:https://mp.weix ...
- 吴恩达深度学习第2课第2周编程作业 的坑(Optimization Methods)
我python2.7, 做吴恩达深度学习第2课第2周编程作业 Optimization Methods 时有2个坑: 第一坑 需将辅助文件 opt_utils.py 的 nitialize_param ...
- 吴恩达深度学习第1课第4周-任意层人工神经网络(Artificial Neural Network,即ANN)(向量化)手写推导过程(我觉得已经很详细了)
学习了吴恩达老师深度学习工程师第一门课,受益匪浅,尤其是吴老师所用的符号系统,准确且易区分. 遵循吴老师的符号系统,我对任意层神经网络模型进行了详细的推导,形成笔记. 有人说推导任意层MLP很容易,我 ...
- 吴恩达深度学习第4课第3周编程作业 + PIL + Python3 + Anaconda环境 + Ubuntu + 导入PIL报错的解决
问题描述: 做吴恩达深度学习第4课第3周编程作业时导入PIL包报错. 我的环境: 已经安装了Tensorflow GPU 版本 Python3 Anaconda 解决办法: 安装pillow模块,而不 ...
- 【DeepLearning学习笔记】Coursera课程《Neural Networks and Deep Learning》——Week2 Neural Networks Basics课堂笔记
Coursera课程<Neural Networks and Deep Learning> deeplearning.ai Week2 Neural Networks Basics 2.1 ...
- 吴恩达深度学习 反向传播(Back Propagation)公式推导技巧
由于之前看的深度学习的知识都比较零散,补一下吴老师的课程希望能对这块有一个比较完整的认识.课程分为5个部分(粗体部分为已经看过的): 神经网络和深度学习 改善深层神经网络:超参数调试.正则化以及优化 ...
- 深度学习 吴恩达深度学习课程2第三周 tensorflow实践 参数初始化的影响
博主 撸的 该节 代码 地址 :https://github.com/LemonTree1994/machine-learning/blob/master/%E5%90%B4%E6%81%A9%E8 ...
- Coursera 吴恩达 深度学习 学习笔记
神经网络和深度学习 Week 1-2 神经网络基础 Week 3 浅层神经网络 Week 4 深层神经网络 改善深层神经网络 Week 1 深度学习的实用层面 Week 2 优化算法 Week 3 超 ...
随机推荐
- Spring/Springboot——JavaConfig
1.认识JavaConfig JavaConfig是Spring的一个子项目,在Spring4之后成为一个核心功能 JavaConfig中使用的注解: @Configuration 在类上打上这一标签 ...
- action中return returnSuccess()
1.action中return returnSuccess() 作用是什么?
- Java引用类型之弱引用与幻像引用
这一篇将介绍弱引用和幻像引用. 1.WeakReference WeakReference也就是弱引用,弱引用和软引用类似,它是用来描述"非必须"的对象的,它的强度比软引用要更弱一 ...
- Android 本地缓存Acache的简单使用
设置缓存数据: ACache mCache = ACache.get(this); mCache.put("key1", "value"); //保存6秒,如果 ...
- SpringSecurity权限管理系统实战—四、整合SpringSecurity(上)
目录 SpringSecurity权限管理系统实战-一.项目简介和开发环境准备 SpringSecurity权限管理系统实战-二.日志.接口文档等实现 SpringSecurity权限管理系统实战-三 ...
- Jmeter系列(50)- 详解 If 控制器
如果你想从头学习Jmeter,可以看看这个系列的文章哦 https://www.cnblogs.com/poloyy/category/1746599.html 简单介绍 可以通过条件来控制是否运行其 ...
- python 07 字典 集合
字典 key:value 键:值 映射,哈希值,关系(数组) x=['1','2'] y=['a','b'] >>print(y[x.index('1')]) a index() 函数用于 ...
- 网络基础之IP地址
一.IP地址 1.IP地址就是给互联网上每一台主机 (或路由器)每一个接口分配一个在全世界范围内是唯一的32位二进制的地址标识符.现在由互联网名字和数字分配机构ICANN进行分配. 2.转换成十进制 ...
- 手把手教你使用VUE+SpringMVC+Spring+Mybatis+Maven构建属于你自己的电商系统之vue后台前端框架搭建——猿实战01
猿实战是一个原创系列文章,通过实战的方式,采用前后端分离的技术结合SpringMVC Spring Mybatis,手把手教你撸一个完整的电商系统,跟着教程走下来,变身猿人找到工作不是 ...
- springboot + kafka 入门实例 入门demo
springboot + kafka 入门实例 入门demo 版本说明 springboot版本:2.3.3.RELEASE kakfa服务端版本:kafka_2.12-2.6.0.tgz zooke ...