正文

what should I do if...
...my loss diverges? (increases by order of magnitude, goes to inf. or NaN)
lower the learning rate
raise momentum (with corresponding learning rate drop)
raise weight decay
raise batch size
use gradient clipping (limit the L2 norm of the gradient to a particular value at each iteration; shrink it to that norm if greater)
try another solver: momentum SGD, ADAM, RMSProp, ...
try a smaller initialization (e.g., for a Gaussian init., lower the stdev.)

what should I do if...
...my loss doesn’t improve / gets stuck / drops slowly?

  • raise the learning rate
  • (maybe) lower momentum, weight decay, and/or batch size
  • try another solver: momentum SGD, ADAM, RMSProp, ...
  • transfer a pre-trained (e.g. on ImageNet) initialization, if possible
  • use a larger initialization (in particular, make sure you didn’t zero-initialize any multiplicative weights in intermediate layers)
  • use a “smarter” initialization (e.g., for linear layers followed by ReLUs, try the msra initialization in Caffe)

  • remove some layers to make the network shallower
    at least to start!
    a strategy for model design: begin with a simple, trainable network; “deepen” it by adding new layers one-by-one

-modify the architecture to improve gradient flow:
batch normalization
residual learning [ResNet]
intermediate losses [GoogLeNet]
other tricks

be patient! (go outside?)
deep learning can take a long time
training AlexNet in 2012: 12 days
although this is down to 1 day in 2015!
loss hovers around the chance value of ln(1000) ≅ 6.908 for the first 1000+ iterations (~1 hour on 2012 GPU)
training ResNet-152 in 2015: 1-2 months (on 8 GPUs!)
the best configurations (net architectures, solvers) at convergence are often not the ones that train fastest early on
some tricks to speed up learning can be “greedy” rather than ultimately beneficial

补充一个:如果显存不够,考虑设定iter_size来增大batch_size

reference

https://docs.google.com/presentation/d/1HxGdeq8MPktHaPb-rlmYYQ723iWzq9ur6Gjo71YiG0Y/edit#slide=id.g8629ab2c8_0_60

caffe调loss方法的更多相关文章

  1. JVM垃圾回收机制总结:调优方法

    转载: JVM垃圾回收机制总结:调优方法 JVM 优化经验总结 JVM 垃圾回收器工作原理及使用实例介绍

  2. JVM调优总结:调优方法

    JVM调优总结:调优方法 2012-01-10 14:35 和你在一起 和你在一起的博客 字号:T | T 下面文章将讲解JVM的调优工具以及如何去调优等等问题,还有一些异常问题的处理.详细请看下文. ...

  3. Web app 的性能瓶颈与性能调优方法

    1. web app 性能测试工具使用 2. mysql 性能分析与调优方法

  4. 性能测试培训:tomcat性能调优方法

    性能测试培训:tomcat性能调优方法   poptest是国内唯一一家培养测试开发工程师的培训机构,以学员能胜任自动化测试,性能测试,测试工具开发等工作为目标.在poptest的loadrunner ...

  5. LightGBM 调参方法(具体操作)

     sklearn实战-乳腺癌细胞数据挖掘(博主亲自录制视频) https://study.163.com/course/introduction.htm?courseId=1005269003& ...

  6. disruptor调优方法

    翻译自disruptor在github上的文档,https://github.com/LMAX-Exchange/disruptor/wiki/Getting-Started Basic Tuning ...

  7. JVM调优方法

    目 录 目 录 I 诠释JVM调优 1 第1章 JVM内存模型及垃圾收集算法 1 1.1 根据Java虚拟机规范,JVM将内存划分为 1 1.2 垃圾回收算法 1 第2章 内存泄漏及解决方法 2 2. ...

  8. 无刷电调修理方法 | 银燕(EMAX)12A无刷电调维修

    一. 银燕(XP-12A)电调修理 笔者的电调在使用4S电池时烧毁,其中一个PMOS管明显烧焦. 将其拆除,买来新元件重新焊接,通电依然冒烟了. 引脚定义 丝印662F: XC6206P332MR 低 ...

  9. Python中Gradient Boosting Machine(GBM)调参方法详解

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

随机推荐

  1. npm & webpack

    npm 全称 node package manager,是 js 的包管理工具,开发人员可以把写好的框架.库发布到 npm 上,使用者在使用时候就可很方便地通过 npm 来下载,只要在 npm官网 有 ...

  2. Spring Boot默认Initializer(1)——ConfigurationWarningsApplicationContextInitializer

    ConfigurationWarningsApplicationContextInitializer的作用是用来报告Spring容器的一些常见的错误配置的.这个类中定义了两个内部类: 1. 定义了一个 ...

  3. Java序列化Serializable

    1.什么是序列化和反序列化 Serialization(序列化)是一种将对象以一连串的字节描述的过程:deserialization(反序列化)是一种将这些字节重建成一个对象的过程. 2.什么情况下需 ...

  4. IOS应用内嵌cocos2dx游戏项目

    1.创建Cocos2d-x项目 相比于Android来说cocos2dx的iPhone环境基本不用配置,直接创建用xcode打开就可以运行. 到Cocos2d-x官方网站下载最新版本引擎. 将刚才下载 ...

  5. Css样式压缩、美化、净化工具 源代码

    主要功能如下: /* 美化:格式化代码,使之容易阅读 */ /* 净化:将代码单行化,并去除注释 */ /* 压缩:将代码最小化,加快加载速度 */ /* 以下是演示代码 */ /*reset beg ...

  6. 阿里云主机Nginx下配置NodeJS、Express和Forever

    https://cnodejs.org/topic/5059ce39fd37ea6b2f07e1a3 AngularJS中文社区即运行在阿里云主机上,本站使用Nginx引擎,为了AngularJS,我 ...

  7. HNUOJ 13341

    题目给你一个串, 串是严格的 1 – n 的排列,里面的数是随机的 把这个串里面的数字分别输出//先预处理,对于给出的串能找到里面的最大数,再 DFS 处理 #include<iostream& ...

  8. 图解Metrics, tracing, and logging

    Logging,Metrics 和 Tracing   最近在看Gophercon大会PPT的时候无意中看到了关于Metrics,Tracing和Logging相关的一篇文章,凑巧这些我基本都接触过, ...

  9. login_code

    #! -*- coding:utf-8 -*-"""http://www.cnblogs.com/weke/articles/6271206.html前置和后置1.set ...

  10. SQL*Plus工具

    或者