当前位置:网站首页>李宏毅机器学习组队学习打卡活动day05---网络设计的技巧
李宏毅机器学习组队学习打卡活动day05---网络设计的技巧
2022-07-27 05:01:00 【CharlesLC的博客】
写在前面
报名了一个组队学习,这次学习网络设计的技巧,对应的是李宏毅老师深度学习视频的P5-p9。
参考视频:https://www.bilibili.com/video/av59538266
参考笔记:https://github.com/datawhalechina/leeml-notes
局部最小值和鞍点
在梯度下降的时候,优化有些时候会失败,即出现了梯度为零的点,但是梯度为零的点,不只有对应local minima(局部最小值),也有可能对应鞍点(saddle point)
那么怎么判断是saddle point还是local minimal?
利用泰勒公式进行判断,如果是Critical point(一阶导数为零),那么第二项就为零,那我们只需要判断二阶微分的情况。

如果Hessian矩阵H的特征值全大于零,那么它就是Local minima; 如果特征值全小于零,那么它就是Local maxima; 如果特征值有大于零,又有小于零,那么这个点就是Saddle point
如果点卡在saddle point,那么沿着特征值为负的特征向量走。
例如:这个矩阵
,算得一个特征值为-2,特征向量为[1;1],只需沿着特征向量方向走就可以解决。
但是这个计算量太大,实际操作中不会这样用。
batch(批次) 和 momentum(动量)
batch
我们可以用Batch的思想来优化,可以将样本划分,对每一个小样本进行梯度下降。
Small Batch v.s. Large Batch
利用GPU的平行计算,可以看出一次中batch size为100和batch size为1的计算时间差不多

总体上来看,Smaller batch需要更多的时间。
Small batch 会有更好的运行效果。

总结
Moment
Moment通常会保持上一次的梯度下降趋势,即上一次的梯度下降趋势会对本次的梯度下降有影响。

自动调节学习速率

RMSProp
RMSProp 迭代方式:

Adam
Adam:RMSProp + Momentum
Suammary

Loss 也会产生影响
Cross-entropy比 Mean Square Error更常用于分类。
例子:
批次标准化(Batch Normalization)
Feature Normalization
Feature Normalization的作用是 让 x i x_i xi的范围设定相同
Considering Deep Learning
在深度学习中有多层,上一层的输出就是下一层的输入,如果对上一层的input进行处理,但是在下一层中运算导致数据之间也相差很大,同样地,也应该进行处理。
但是,当改变 z i z^i zi的值的时候,会影响 μ \mu μ和 σ \sigma σ, z ( i + 1 ) z^{(i+1)} z(i+1)的值也会发生改变,每一个计算都会改变,导致整个网络中中间结果特别多,所以我们要考虑分批处理,也就是Batch Normalization

在求得之后,再将 γ \gamma γ乘上 z ~ i \tilde{z}^i z~i再加上 β \beta β。而 β \beta β和 γ \gamma γ是单独训练出来的,为了防止 z ~ i \tilde{z}^i z~i平均数为0,会给神经网络带来负面影响。
边栏推荐
- 集合框架的使用
- During its low-level period, this slave edge causes the instruction number to make a corresponding model
- JVM上篇:内存与垃圾回收篇八--运行时数据区-方法区
- Scientific Computing Library - numpy
- B1021 个位数统计
- JVM Part 1: memory and garbage collection part 10 - runtime data area - direct memory
- 使用Druid连接池创建DataSource(数据源)
- 辗转相除法
- Could not autowire.No beans of ‘userMapper‘ type found.
- JVM Part 1: memory and garbage collection part 6 -- runtime data area local method & local method stack
猜你喜欢

数据库连接池&&Druid使用

2、 MySQL advanced

OFDM 16 lecture 2-ofdm and the DFT

Introduction to dynamic memory functions (malloc free calloc realloc)

Inspiration from "flying man" Jordan! Another "arena" opened by O'Neill

JVM上篇:内存与垃圾回收篇十--运行时数据区-直接内存

Laozi cloud and Fuxin Kunpeng achieved a major breakthrough in 3D ofd 3D format documents for the first time

String class

Prime number screening (Ehrlich sieve method, interval sieve method, Euler sieve method)

Explore the mysteries of the security, intelligence and performance of the universal altek platform!
随机推荐
Explore the mysteries of the security, intelligence and performance of the universal altek platform!
2022 Zhengzhou light industry Freshmen's competition topic - I won't say if I'm killed
JVM Part 1: memory and garbage collection part 11 -- execution engine
B1022 D进制的A+B
B1028 census
B1021 个位数统计
Critical path principle
Derivation and explanation of PBR physical illumination calculation formula
Basic operation of vim
34. Analyze flexible.js
Card drawing program simulation
Scientific Computing Library -- Matplotlib
JVM上篇:内存与垃圾回收篇十四--垃圾回收器
What is the future development direction of software testing engineers?
mq常见问题
B1030 perfect sequence
Typescript details
整合SSM
What should test / development programmers over 35 do? Many objective factors
Prime number screening (Ehrlich sieve method, interval sieve method, Euler sieve method)