该系列仅在原课程基础上部分知识点添加个人学习笔记,或相关推导补充等。如有错误,还请批评指教。在学习了 Andrew Ng 课程的基础上,为了更方便的查阅复习,将其整理成文字。因本人一直在学习英语,所以该系列以英文为主,同时也建议读者以英文为主,中文辅助,以便后期进阶时,为学习相关领域的学术论文做铺垫。- ZJ
转载请注明作者和出处:ZJ 微信公众号-「SelfImprovementLab」
知乎:https://zhuanlan.zhihu.com/c_147249273
CSDN:http://blog.csdn.net/junjun_zhao/article/details/78977256
3.1 Neural Networks Overview (神经网络概览)
(字幕来源:网易云课堂)
Welcome back in this week’s videos,you learn to implement a neural network.Before diving into the technical details.I wanted in this video to give you a quick overview ,of what you’ll be seeing in this week’s videos.So if you don’t follow all the details in this video,don’t worry about it,we’ll delve in the technical details in the next few videos,But for now, let’s give a quick overview of how you implement in your network.Last week we had talked about logistic regression,and we saw how this model corresponds to the following computation graph,where you need to put the features X and parameters w and b,that allows you to compute z,which is then used to compute a.And we were using a ,and then you can compute the loss function L.interchangeably with this output Y hat.
欢迎回来,通过本周的视频课程,你会学到如何实现一个神经网络,在我们深入学习技术细节之前,通过本视频我想带你快速地了解一下,本周课程中你会学习到哪些内容,所以 如果本视频的某些内容你不甚理解,不用太担心,之后的视频课程里 还会深入其中的技术细节,但现在我们来快速过一遍,如何实现神经网络,上周我们讨论了 logistic 回归,一起了解了 这个模型,和下面这个流程图的联系,这里面 你需要输入特征 x、参数 w和 b,用那些计算 z,然后用 z 计算出 a,我们用 a 同时表示输出 y^ ,接下你就可以计算损失函数 L 。
A neural network looks like this,and as I’d already previously alluded,you can form a neural network by stacking together a lot of little
神经网络就是这个样子,我之前已经提到过了,你可以把很多
First, with inputs the features X,together with some parameters W and b,and this will allow you to compute z[1] ,so new notation that one should use is that,we’ll use a superscript square bracket 1,to refer to quantities associated with this stack of nodes,called a layer,and then later we’ll use superscript square bracket 2,to refer to quantities associated with that,really that’s called another layer of the neural network,and the superscript square brackets like we have here,are not to be confused with the superscript round brackets,which we used to refer to individual training examples,so whereas x superscript round bracket i,referred to the Ith trained example,superscript square bracket 1 and 2 refers to,these different layers layer 1 and layer 2 in this network,but they’re going on after computing z[1] similar to logistic regression,there will be a computation to compute a1 and that’s just some sigmoid of z[1] .
首先 我们用
x
表示输入特征,还有参数
and then you compute z[2] using another linear equation,and then compute a[2] ,and a[2] is the final output of the neural network,and will also be used interchangeably with y hat,so I know there was a lot of details,but the key intuition to take away is that,whereas for logistic regression we had this z followed by a calculation,and this neural network here we just do it multiple times,a z followed by a calculation,and a z followed by a calculation,and then you finally compute the loss at the end,and you remember that for the logistic regression,we had in some backward calculation,in order to compute derivatives they computing da dz and so on,so in the same way in a neural network,we’ll end up doing a backward calculation,that looks like this,and you end up computing d a[2] d z[2] ,that allows you to compute so dW[2] db^[2] and so on ,in this order the right to left backward calculation,that is denoting with the red arrows
接下来你用另外一个线性方程计算 z[2] ,接着计算 a[2] , a[2] 就是整个神经网络的最终输出,同时我也用 y^ 表示网络的输出,我知道其中有很多细节,但关键你要学到这种直觉, logistic 回归中得到 z 后 直接计算 a,而这个神经网络中我们要做多次计算,反复计算 z 和 a,反复计算 a 和 z,最后计算损失函数,应该还记得 在 logistic 回归中,会有这种反向计算,用来计算导数 da dz 这些,同样在神经网络中,也有类似的反向计算,像这样,最后会计算 da[2] 还有 dz[2] ,然后让你计算出 dW[2] db[2] 等等,就是这样从右到左反向计算,用红色箭头表示的方向。
So that’s quick overview of what a neural network looks like,but we basically take the logistic regression,and repeating it twice,I know there was a lot of new notation lot of new details,don’t worry about to get and follow everything,we’ll go into the details most slowly in the next few videos,so let’s go on to the next video,we’ll stop to talk about the neural network representation
刚才带你大概了解了一下神经网络长什么样,基本上我们把 logistic 回归,重复了两次,这视频讲了很多新符号和细节,如果你没有理解 不用担心,在接下来的视频中 我们会慢慢讲解这些细节,继续看下一个视频吧,我们将会开始讨论 神经网络的表示。
重点总结:
- z[1] ,我们会使用新的符号,上标 方括号 1,表示与这些节点相关的量,所谓的“层”
-
x
上标
(i) 表示,第 i <script type="math/tex" id="MathJax-Element-55">i</script> 个训练样本, 圆括号是用来表示单个训练样本的。 - 在神经网络中我们要做多次计算,反复计算 z 和 a,反复计算 a 和 z,最后计算损失函数。
PS: 欢迎扫码关注公众号:「SelfImprovementLab」!专注「深度学习」,「机器学习」,「人工智能」。以及 「早起」,「阅读」,「运动」,「英语 」「其他」不定期建群 打卡互助活动。