Caffe傻瓜系列(11):caffe中的lr_policy选择
在自己配置训练网络时的solver文件中这个参数选择有好多种策略。
接下来看看caffe.proto文件的这个参数:
![](https://code.csdn.net/assets/CODE_ico.png)
- // The learning rate decay policy. The currently implemented learning rate
- // policies are as follows:
- // - fixed: always return base_lr.
- // - step: return base_lr * gamma ^ (floor(iter / step))
- // - exp: return base_lr * gamma ^ iter
- // - inv: return base_lr * (1 + gamma * iter) ^ (- power)
- // - multistep: similar to step but it allows non uniform steps defined by
- // stepvalue
- // - poly: the effective learning rate follows a polynomial decay, to be
- // zero by the max_iter. return base_lr (1 - iter/max_iter) ^ (power)
- // - sigmoid: the effective learning rate follows a sigmod decay
- // return base_lr ( 1/(1 + exp(-gamma * (iter - stepsize))))
- //
- // where base_lr, max_iter, gamma, step, stepvalue and power are defined
- // in the solver parameter protocol buffer, and iter is the current iteration.
如果安装digists的话,可以按照here 进行选。
没装,按matlab实现:
![](https://code.csdn.net/assets/CODE_ico.png)
- iter=1:50000;
- max_iter=50000;
- base_lr=0.01;
- gamma=0.0001;
- power=0.75;
- step_size=5000;
- % - fixed: always return base_lr.
- lr=base_lr*ones(1,50000);
- subplot(2,3,1)
- plot(lr)
- title('fixed')
- % - step: return base_lr * gamma ^ (floor(iter / step))
- lr=base_lr .* gamma.^(floor(iter./10000));
- subplot(2,3,2)
- plot(lr)
- title('step')
- % - exp: return base_lr * gamma ^ iter
- lr=base_lr * gamma .^ iter;
- subplot(2,3,3)
- plot(lr)
- title('exp')
- % - inv: return base_lr * (1 + gamma * iter) ^ (- power)
- lr=base_lr.*(1./(1+gamma.*iter).^power);
- subplot(2,3,4)
- plot(lr)
- title('inv')
- % - multistep: similar to step but it allows non uniform steps defined by
- % stepvalue
- % - poly: the effective learning rate follows a polynomial decay, to be
- % zero by the max_iter. return base_lr (1 - iter/max_iter) ^ (power)
- lr=base_lr *(1 - iter./max_iter) .^ (power);
- subplot(2,3,5)
- plot(lr)
- title('poly')
- % - sigmoid: the effective learning rate follows a sigmod decay
- % return base_lr ( 1/(1 + exp(-gamma * (iter - stepsize))))
- lr=base_lr *( 1./(1 + exp(-gamma * (iter - step_size))));
- subplot(2,3,6)
- plot(lr)
- title('sigmoid')
结果:
Caffe傻瓜系列(11):caffe中的lr_policy选择相关推荐
- Caffe学习系列(11):图像数据转换成db(leveldb/lmdb)文件
在深度学习的实际应用中,我们经常用到的原始数据是图片文件,如jpg,jpeg,png,tif等格式的,而且有可能图片的大小还不一致.而在caffe中经常使用的数据类型是lmdb或leveldb,因此就 ...
- javascript学习系列(11):数组中的findIndex方法
最好的种树是十年前,其次是现在.歌谣 每天一个前端小知识 提醒你改好好学习了 知乎博主 csdn博主 b站博主 放弃很容易但是坚持一定很酷 我是歌谣 喜欢就一键三连咯 你得点赞是对歌谣最大的 ...
- 机器学习系列(11)_Python中Gradient Boosting Machine(GBM)调参方法详解
原文地址:Complete Guide to Parameter Tuning in Gradient Boosting (GBM) in Python by Aarshay Jain 原文翻译与校对 ...
- Caffe新手教程傻瓜系列(9):训练和测试自己的图片
在深度学习的实际应用中,我们经常用到的原始数据是图片文件,如jpg,jpeg,png,tif等格式的,而且有可能图片的大小还不一致.而在caffe中经常使用的数据类型是lmdb或leveldb,因 ...
- Caffe学习系列(12):训练和测试自己的图片
学习caffe的目的,不是简单的做几个练习,最终还是要用到自己的实际项目或科研中.因此,本文介绍一下,从自己的原始图片到lmdb数据,再到训练和测试模型的整个流程. 一.准备数据 有条件的同学,可以去 ...
- Caffe 学习系列
学习列表: Google protocol buffer在windows下的编译 caffe windows 学习第一步:编译和安装(vs2012+win 64) caffe windows学习:第一 ...
- 【12】Caffe学习系列:训练和测试自己的图片
一.准备数据 有条件的同学,可以去imagenet的官网http://www.image-net.org/download-images,下载imagenet图片来训练.验证码始终出不来需要翻墙(是g ...
- Caffe学习系列(7):solver及其配置
solver算是caffe的核心的核心,它协调着整个模型的运作.caffe程序运行必带的一个参数就是solver配置文件.运行代码一般为 # caffe train --solver=*_slover ...
- Caffe学习系列(8):solver优化方法
Caffe学习系列(8):solver优化方法 上文提到,到目前为止,caffe总共提供了六种优化方法: Stochastic Gradient Descent (type: "SGD&qu ...
- Caffe学习系列(17):模型各层特征和过滤器可视化
转载自: Caffe学习系列(17):模型各层特征和过滤器可视化 - denny402 - 博客园 http://www.cnblogs.com/denny402/p/5105911.html cif ...
最新文章
- 20165201 实验五 网络编程与安全
- 我的第一篇paper
- WinAPI: PolyBezier - 绘制贝塞尔线
- 计算机二级msoffice操作题如何评分,2017年计算机二级MSOffice操作题及答案解析
- 黑马lavarel教程---6、简单验证
- Java学习笔记(二)--Java开发环境
- 使用Samba服务器构建私有和公共共享目录
- 如何清理Virtualbox虚拟机VDI镜像文件的空间大小
- 发光强度/光通量/光照度/亮度/坎德拉/流明/勒克斯/尼特之间的关系和换算
- js创建对象的几种常用方式小结(推荐)
- 大话设计模式-原型模式的浅复制与深复制
- 常用Physionet命令整理
- android自定义按钮控件样式
- NFC模拟门禁卡,不用电脑,将门禁卡等各种卡模拟进手机里,无需root
- 计算机函数说课ppt,幂函数说课课件
- 第十四周助教工作总结——NWNU李泓毅
- 中国省数据字典表sql
- 华为路由器:ospf协议入门介绍
- 自动组策略(GPO)备份工具
- 利用Excel函数对 重复数据进行编号解决方法
热门文章
- 数据-第17课-栈课后练习
- java.lang.NoSuchFieldError: INSTANCE at org.apache.http.conn.ssl.SSLConnectionSocketFactory
- day10 强制类型转换(更新)
- Python入门篇-基础数据类型整型(int),字符串(str)和切片(slice)
- 混合开启服务-----百度音乐盒
- SQL Server 中WITH (NOLOCK)
- 浅谈分类与标签机制的特色
- 18个有用的 .htaccess 文件使用技巧
- 库存管理系统开发过程
- 男人在拥有女人之后!