吴恩达《深度学习》-课后测验-第一门课 (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 超 ...
随机推荐
- 火题小战 B. barbeque
火题小战 B. barbeque 题目描述 \(Robbery\) 是一个大吃货(雾) 某个神奇的串由牛肉和青椒构成,于是\(Robbery\)购买了\(n\)个餐包来自己做这个串,每个餐包中有一些牛 ...
- 完了,这个硬件成精了,它竟然绕过了 CPU...
我们之前了解过了 Linux 的进程和线程.Linux 内存管理,那么下面我们就来认识一下 Linux 中的 I/O 管理. Linux 系统和其他 UNIX 系统一样,IO 管理比较直接和简洁.所有 ...
- Web框架的原理详情
Web框架的原理 Web框架本质 我们可以这样理解:所有的Web应用本质上就是一个socket服务端,而用户的浏览器就是一个socket客户端. 这样我们就可以自己实现Web框架了. socket服务 ...
- 实战分享丨MySQL 与Django版本匹配相关经验
摘要:关于MySQL 与Django版本匹配相关知识的经验分享. run: (env) E:\PythonPro\PyDjangoProDemo011\xuanyuaniotpro>python ...
- Ubuntu 18.04 安装配置 go 语言
Ubuntu 18.04 安装配置 go 语言 1.下载 下载 jdk 到 Downloands 文件夹下 cd 进入 /usr/local, 创建 go 文件夹, 然后 cd 进这个文件夹 cd / ...
- 在string.replace中使用具名组匹配
let reg = /(?<year>\d{4})-(?<month>\d{2})-(?<day>\d{2})/; let re = '2015-01-02'. r ...
- df卡死和fork:cannot allocate memory报错
早上到了公司,发现docker资源池的某一台主机根文件系统写满. 检查后发现该主机/data目录未挂载文件系统,直接放在了根目录下.于是联系业务方将应用迁移,联系主机工程师为/data挂载80G的存储 ...
- 牛客网PAT练兵场-程序运行时间
题解:无(注意下四舍五入和输出格式即可) 题目地址:https://www.nowcoder.com/questionTerminal/fabbb85fc2d342418bcacdf0148b6130 ...
- 从 BIO、NIO 聊到 Netty,最后还要实现个 RPC 框架!
大家好,我是 「后端技术进阶」 作者,一个热爱技术的少年. 觉得不错的话,欢迎 star!ღ( ´・ᴗ・` )比心 Netty 从入门到实战系列文章地址:https://github.com/Snai ...
- js判断传递参数的的类型,并返回
function type(target) { var templet ={ "[object Array]" : "arry"; "[obj ...