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 ...
最新文章
- 实战:使用 OpenCV 和 PyTesseract 对文档进行OCR
- asmlib方式管理oracle asm环境下,新加存储需特别注意
- STM32 进阶教程 14 - 程序加密之FLASH读写保护
- dbgrid的最小高度设置。否则出现滚动条。
- ubuntu设置自启动服务程序
- SQL2008R2的 遍历所有表更新统计信息 和 索引重建
- matlab the installer cannot read,MATLAB安装 The installer cannot read the mwinstall.dll… | 学步园...
- php中id如何与删除关联,ThinkPHP查询语句与关联查询用法实例
- C++学习之路 | PTA(天梯赛)—— L2-010 排座位 (25分)(带注释)(并查集)(精简)
- 【Python】pyCryptodome模块实现AES加密、解密
- 2.Java 面试题整理(基础篇二)
- LogSegment分析
- CTF__(1)Web之SQL手工注入
- WebLogic简单的备份和恢复
- 如何生成PSSM矩阵
- 毕业设计开发板-基于C20S单片机恒温开发板
- 像《王者荣耀》一样红过
- 微信小程序使用iconfont图标 微信小程序上传图片
- python读取stl文件三维坐标_python vtk 读取三维raw数据存为stl
- 多位点序列分型_bionumerics应用16-全基因多位点序列分型(wgMLST)
热门文章
- Python 中的几种矩阵乘法 np.dot, np.multiply, *【转】
- 【JAVA笔记——术】JAVA LIST DEL遍历方式研究
- 常用iOS游戏开发工具与SDK
- SQL Server 2005 技术内幕之T-SQL查询——逻辑查询处理(上)
- 深入理解JavaScript系列
- MASM32编程将TimeStamp/UTC转换为具体日期时间的几个有用函数代码
- 我的航拍直升机 控制基站软件的编写历程(2.1)
- 【漫画】兔子,胡萝卜和屎
- 第2章 JSP数据交互(一)
- 遍历结构体内部元素和值(Name and Value)