在自己配置训练网络时的solver文件中这个参数选择有好多种策略。

接下来看看caffe.proto文件的这个参数:

[cpp] view plaincopy
  1. // The learning rate decay policy. The currently implemented learning rate
  2. // policies are as follows:
  3. //    - fixed: always return base_lr.
  4. //    - step: return base_lr * gamma ^ (floor(iter / step))
  5. //    - exp: return base_lr * gamma ^ iter
  6. //    - inv: return base_lr * (1 + gamma * iter) ^ (- power)
  7. //    - multistep: similar to step but it allows non uniform steps defined by
  8. //      stepvalue
  9. //    - poly: the effective learning rate follows a polynomial decay, to be
  10. //      zero by the max_iter. return base_lr (1 - iter/max_iter) ^ (power)
  11. //    - sigmoid: the effective learning rate follows a sigmod decay
  12. //      return base_lr ( 1/(1 + exp(-gamma * (iter - stepsize))))
  13. //
  14. // where base_lr, max_iter, gamma, step, stepvalue and power are defined
  15. // in the solver parameter protocol buffer, and iter is the current iteration.

如果安装digists的话,可以按照here 进行选。

没装,按matlab实现:

[cpp] view plaincopy
  1. iter=1:50000;
  2. max_iter=50000;
  3. base_lr=0.01;
  4. gamma=0.0001;
  5. power=0.75;
  6. step_size=5000;
  7. % - fixed: always return base_lr.
  8. lr=base_lr*ones(1,50000);
  9. subplot(2,3,1)
  10. plot(lr)
  11. title('fixed')
  12. % - step: return base_lr * gamma ^ (floor(iter / step))
  13. lr=base_lr .* gamma.^(floor(iter./10000));
  14. subplot(2,3,2)
  15. plot(lr)
  16. title('step')
  17. % - exp: return base_lr * gamma ^ iter
  18. lr=base_lr * gamma .^ iter;
  19. subplot(2,3,3)
  20. plot(lr)
  21. title('exp')
  22. % - inv: return base_lr * (1 + gamma * iter) ^ (- power)
  23. lr=base_lr.*(1./(1+gamma.*iter).^power);
  24. subplot(2,3,4)
  25. plot(lr)
  26. title('inv')
  27. % - multistep: similar to step but it allows non uniform steps defined by
  28. % stepvalue
  29. % - poly: the effective learning rate follows a polynomial decay, to be
  30. % zero by the max_iter. return base_lr (1 - iter/max_iter) ^ (power)
  31. lr=base_lr *(1 - iter./max_iter) .^ (power);
  32. subplot(2,3,5)
  33. plot(lr)
  34. title('poly')
  35. % - sigmoid: the effective learning rate follows a sigmod decay
  36. % return base_lr ( 1/(1 + exp(-gamma * (iter - stepsize))))
  37. lr=base_lr *( 1./(1 + exp(-gamma * (iter - step_size))));
  38. subplot(2,3,6)
  39. plot(lr)
  40. title('sigmoid')

结果:

Caffe傻瓜系列(11):caffe中的lr_policy选择相关推荐

  1. Caffe学习系列(11):图像数据转换成db(leveldb/lmdb)文件

    在深度学习的实际应用中,我们经常用到的原始数据是图片文件,如jpg,jpeg,png,tif等格式的,而且有可能图片的大小还不一致.而在caffe中经常使用的数据类型是lmdb或leveldb,因此就 ...

  2. javascript学习系列(11):数组中的findIndex方法

    最好的种树是十年前,其次是现在.歌谣 每天一个前端小知识 提醒你改好好学习了 知乎博主 csdn博主 b站博主  放弃很容易但是坚持一定很酷     我是歌谣 喜欢就一键三连咯 你得点赞是对歌谣最大的 ...

  3. 机器学习系列(11)_Python中Gradient Boosting Machine(GBM)调参方法详解

    原文地址:Complete Guide to Parameter Tuning in Gradient Boosting (GBM) in Python by Aarshay Jain 原文翻译与校对 ...

  4. Caffe新手教程傻瓜系列(9):训练和测试自己的图片

    在深度学习的实际应用中,我们经常用到的原始数据是图片文件,如jpg,jpeg,png,tif等格式的,而且有可能图片的大小还不一致.而在caffe中经常使用的数据类型是lmdb或leveldb,因 ...

  5. Caffe学习系列(12):训练和测试自己的图片

    学习caffe的目的,不是简单的做几个练习,最终还是要用到自己的实际项目或科研中.因此,本文介绍一下,从自己的原始图片到lmdb数据,再到训练和测试模型的整个流程. 一.准备数据 有条件的同学,可以去 ...

  6. Caffe 学习系列

    学习列表: Google protocol buffer在windows下的编译 caffe windows 学习第一步:编译和安装(vs2012+win 64) caffe windows学习:第一 ...

  7. 【12】Caffe学习系列:训练和测试自己的图片

    一.准备数据 有条件的同学,可以去imagenet的官网http://www.image-net.org/download-images,下载imagenet图片来训练.验证码始终出不来需要翻墙(是g ...

  8. Caffe学习系列(7):solver及其配置

    solver算是caffe的核心的核心,它协调着整个模型的运作.caffe程序运行必带的一个参数就是solver配置文件.运行代码一般为 # caffe train --solver=*_slover ...

  9. Caffe学习系列(8):solver优化方法

    Caffe学习系列(8):solver优化方法 上文提到,到目前为止,caffe总共提供了六种优化方法: Stochastic Gradient Descent (type: "SGD&qu ...

  10. Caffe学习系列(17):模型各层特征和过滤器可视化

    转载自: Caffe学习系列(17):模型各层特征和过滤器可视化 - denny402 - 博客园 http://www.cnblogs.com/denny402/p/5105911.html cif ...

最新文章

  1. 20165201 实验五 网络编程与安全
  2. 我的第一篇paper
  3. WinAPI: PolyBezier - 绘制贝塞尔线
  4. 计算机二级msoffice操作题如何评分,2017年计算机二级MSOffice操作题及答案解析
  5. 黑马lavarel教程---6、简单验证
  6. Java学习笔记(二)--Java开发环境
  7. 使用Samba服务器构建私有和公共共享目录
  8. 如何清理Virtualbox虚拟机VDI镜像文件的空间大小
  9. 发光强度/光通量/光照度/亮度/坎德拉/流明/勒克斯/尼特之间的关系和换算
  10. js创建对象的几种常用方式小结(推荐)
  11. 大话设计模式-原型模式的浅复制与深复制
  12. 常用Physionet命令整理
  13. android自定义按钮控件样式
  14. NFC模拟门禁卡,不用电脑,将门禁卡等各种卡模拟进手机里,无需root
  15. 计算机函数说课ppt,幂函数说课课件
  16. 第十四周助教工作总结——NWNU李泓毅
  17. 中国省数据字典表sql
  18. 华为路由器:ospf协议入门介绍
  19. 自动组策略(GPO)备份工具
  20. 利用Excel函数对 重复数据进行编号解决方法

热门文章

  1. 数据-第17课-栈课后练习
  2. java.lang.NoSuchFieldError: INSTANCE at org.apache.http.conn.ssl.SSLConnectionSocketFactory
  3. day10 强制类型转换(更新)
  4. Python入门篇-基础数据类型整型(int),字符串(str)和切片(slice)
  5. 混合开启服务-----百度音乐盒
  6. SQL Server 中WITH (NOLOCK)
  7. 浅谈分类与标签机制的特色
  8. 18个有用的 .htaccess 文件使用技巧
  9. 库存管理系统开发过程
  10. 男人在拥有女人之后!