深度学习论文笔记 [图像处理] Deep Residual Learning for Image Recognition

来源:互联网 发布:中文顶级域名注册 编辑:程序博客网 时间:2024/05/24 06:38

概要

证明了残差网络更容易训练,而且网络更深的时候能够取得更高的准确率。在ImageNet数据集上我们使用152层的残差网络并取得了3.57%的错误率。

简介

深度网络一直存在梯度消散的问题,但最近这个问题已经被normalized initialization和batch normalization很大程度的解决了。另一个问题是网络效果变差,当网络深度增加的时候,准确率反而比层数低的网络要差,但它并不是因为Overfitting变差的,因为即使在训练集上,更深的网络的Train error比浅网络的Train error还要高。为什么会这样,论文没有很好的解释,只是说也许很难对更深的网络进行优化:如果对一个网络不断的加Layer,每一层新的Layer都是恒等变换,那么按理说新的网络最优的结果至少和旧的网络一样好甚至更好。但实验发现通过训练连达到旧网络的效果都很难
更深不一定更好
为了解决的这个问题,我们提出了深度残差网络,作者的观察是:与其让网络优化出我们想要的层与层间的参数(比如至少是恒等变换),不如我们直接让这些层去优化一个残差网络。优化一个残差网络要比优化原来的网络更容易。一个比较正式的描述是:假设H(x)是最优的参数,我们让网络是优化另一个参数F(X) = H(X) - X。这样,最坏情况下,假设是恒等变换,比起训练出恒等变换,训练出F(X)=0要简单得多。 这个方法的好处是它没有增加需要训练的参数个数,也没有增加训练的计算量,而且容易实现。
这里写图片描述

深度残差学习

残差网络模块可以包括许多个Layer,关键的地方是在模块输入和输出之间加一条恒等映射的边。在Figure2的例子中,它包含了两层Layer,F(x) = W2*Relu(W1*x)。模块中的层数一般是2到3层,如果模块中只有一层,它变成了一个线性模型,没有任何优势。如果输入和输出的维度不一样,我们需要用线性映射( linear projection)来解决这个问题。y = F(x, {Wi}) + Ws*x我们同时发现残差也能用在多卷积层中,只是要每个channel分别进行相加。

实验的网络结构

这里写图片描述

实现细节

  • The image is resized with its shorter side randomly sampled in [256; 480] for scale augmentation
  • A 224 * 224 crop is randomly sampled from an image or its horizontal flip, with the per-pixel mean subtracted
  • Use standard color augmentation
  • Batch normalization right after each convolution and before activation
  • use SGD with a mini-batch size of 256
  • the learning rate starts from 0.1 and is divided by 10 when the error plateaus
  • the models are trained for up to 60*10^4 iterations
  • use a weight decay of 0.0001 and a momentum of 0.9
  • No dropout
  • In testing, standard 10-crop testing.
  • average scores at multiple scales (images are resized such that the shorter side is in {224 ; 256 ; 384 ; 480 ; 640}

实验结果

这里写图片描述

0 0