Optimization

1.Reasons for  failure

gradient is close to zero,卡在了critical point(驻点)

判断critical point是不是saddle point,求出H

L(\theta ) \approx L(\theta ^{'})+\frac{1}{2}(\theta -\theta ^{'})^TH(\theta -\theta ^{'})

Sometimes \small v^THv > 0,sometimes \small v^THv < 0    \Rightarrow  Saddle point

\small \lambda is the eigen value of H, \small u is an eigen vector of H

如果卡在了Saddle point,找出\small \lambda为负的时候,所对应的\small u,只要顺着\small u的方向去更新参数,就可以找到更低的Loss。(不是最优解决方法,后续更新)

2.Optimization with Batch

1 epoch = see all the batches once  -->  Shuffle(随机排序) after each batch

Small Batch  v.s  Large Batch

Larger batch size does not require longer time to compute gradient(因为并行计算)

Smaller batch requires longer time for one epoch

 但在测试数据时发现Optimization Fails

原因是 Smaller batch 弹性更大

 summary

 

3.Learning Rate cannot be one-size-fits-all 

Different parameters needs different learning rate

 

 \small \bg_white \small \frac{\eta }{​{\sigma _i}^t} 是 Parameter Dependent  

如何计算\small \bg_white \small \frac{\eta }{​{\sigma _i}^t}

 ……

 \theta _i ^ {t+1} \leftarrow \theta _i ^ {t} - \frac{\eta }{\sigma _i ^ t}g_i^t          \sigma _i ^ t =\sqrt{\frac{1}{t+1}\sum_{i=0}^{t}(g_i^t)^2}          

又想要learning rate能根据时间自动调整,所以引出下面的方法

RMSProp

The recent gradient has larger influence and the past gradients have less influence.

Learning Rate Scheduling

1. Learning Rate Decay

2.Warm Up

4. Summary of Optimization

一般的Gradient Descent

\theta _i ^ {t+1} \leftarrow \theta _i ^ {t}-\eta g_i ^ t

经过多方面的改进

\theta _i ^ {t+1} \leftarrow \theta _i ^ {t}-\frac{\eta^t}{\sigma _i ^ t} m_i ^ t

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值