[Machinie Learning] 吴恩达机器学习课程笔记——Week5

这篇博客详细介绍了吴恩达的机器学习课程中关于神经网络和反向传播的内容。博主总结了成本函数和反向传播算法,包括前向传播、误差计算、梯度下降以及在实践中的注意事项,如参数初始化、梯度检查和随机初始化。此外,还提及了神经网络在自动驾驶等领域的应用,并提供了额外的学习资源链接。
摘要由CSDN通过智能技术生成

Machine Learning by Andrew Ng

💡 吴恩达机器学习课程学习笔记——Week 5
🐠 本人学习笔记汇总 合订本
✓ 课程网址 standford machine learning
🍭 参考资源

学习提纲

Cost Function and Back-propagation

Notation

  • L = total number of layers in the network
  • S l S_l Sl = number of units (not counting bias unit) in layer l
  • K = number of output units/classes

we denote h Θ ​ ( x ) k ​ h_Θ​(x)_k​ hΘ(x)k as being a hypothesis that results in the k-th output
输入x, h Θ ​ ( x ) k ​ h_Θ​(x)_k​ hΘ(x)k是输出的第k个特征

0

1.Cost Function
the cost function for regularized logistic regression
and the cost function for neural network are as below
1


the cost function for regularized logistic regression was

2

for neural network, the cost function is
3
Here, we define δ j l \delta_j^l δjl as the error for a j l a_j^l ajl

4


2.Back-propagation Algorithm

Same as other ml algorithms, our goal is to minimize the cost function

5

Therefor, we need to compute

  • J ( θ ) J(\theta) J(θ)
  • ∂ ∂ θ i , j ( l ) J ( θ ) \frac{\partial}{\partial \theta_{i,j} ^{(l)}} J(\theta) θi,j(l)J(θ)

The algorithm to compute ∂ ∂ θ i , j ( l ) J ( θ ) \frac{\partial}{\partial \theta_{i,j} ^{(l)}} J(\theta) θi,j(l)J(θ) is as below
7

The whole algorithm is as below

step1 and step2, forward propagation
910

step3, compute δ ( L ) \delta^{(L)} δ(L)
11

step4, compute δ ( L − 1 ) \delta^{(L-1)} δ(L1) and so on,
12
13
14
step5, compute the ∂ ∂ θ i , j ( l ) J ( θ ) \frac{\partial}{\partial \theta_{i,j} ^{(l)}} J(\theta) θi,j(l)J(θ)
15
16

3.Back-propagation Intuition
17
19


Back-propagation in Practice

1.Implementation Note: Unrolling Parameters
use gradient checking to assure everything goes well
20
21

2.Gradient Checking
22
23

24

3.Random Initialization
25

26

27

4.Putting It Together
28


6 steps to train a network

29

30


Ideally, we want $h_\theta(x^i) \approx y^i$ But remember that $J(\Theta)$ is not a convex function and thus we can end up in a local minima instead.

31


Application of Neural Networks

1.Autonomous Driving
skip.


Review

skip.

额外阅读

吴恩达机器学习——反向传播算法

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值