论文阅读笔记(八):Deep Residual Learning for Image Recognition ( ResNet )

本文是论文的相关摘要,因为作者的原话最容易理解,所以将精彩语句摘录,帮助快速回忆起文章主要信息。


Deeper neural networks are more difficult to train. We present a residual learning framework to ease the training of networks that are substantially deeper than those used previously.

更深的神经网络更难训练。我们提出了一种残差学习框架来减轻网络训练,这些网络比以前使用的网络更深。我们明确地将层变为学习关于层输入的残差函数,而不是学习未参考的函数。

Is learning better networks as easy as stacking more layers? An obstacle to answering this question was the notorious problem of vanishing/exploding gradients [14, 1, 8], which hamper convergence from the beginning. This problem, however, has been largely addressed by normalized initialization [23, 8, 36, 12] and intermediate normalization layers [16], which enable networks with tens of layers to start converging for stochastic gradient descent (SGD) with backpropagation [22].

学些更好的网络是否像堆叠更多的层一样容易?回答这个问题的一个障碍是梯度消失/爆炸[14, 1, 8]这个众所周知的问题,它从一开始就阻碍了收敛。然而,这个问题通过标准初始化[23, 8, 36, 12]和中间标准化层[16]在很大程度上已经解决,这使得数十层的网络能通过具有反向传播的随机梯度下降(SGD)开始收敛。

When deeper networks are able to start converging, a degradation problem has been exposed: with the network depth increasing, accuracy gets saturated (which might be unsurprising) and then degrades rapidly. Unexpectedly, such degradation is not caused by overfitting, and adding more layers to a suitably deep model leads to higher training error.

更深的网络能够开始收敛时,暴露了一个退化问题:随着网络深度的增加,准确率达到饱和(这可能并不奇怪)然后迅速下降。意外的是,这种下降不是由过拟合引起的,并且在适当的深度模型上添加更多的层会导致更高的训练误差。

The degradation (of training accuracy) indicates that not all systems are similarly easy to optimize. Let us consider a shallower architecture and its deeper counterpart that adds more layers onto it. There exists a solution by construction to the deeper model: the added layers are identity mapping, and the other layers are copied from the learned shallower model. The existence of this constructed solution indicates that a deeper model should produce no higher training error than its shallower counterpart.

退化(训练准确率)表明不是所有的系统都很容易优化。让我们考虑一个较浅的架构及其更深层次的对象,为其添加更多的层。存在通过构建得到更深层模型的解决方案:添加的层是恒等映射,其他层是从学习到的较浅模型的拷贝。 这种构造解决方案的存在表明,较深的模型不应该产生比其对应的较浅模型更高的训练误差。

In this paper, we address the degradation problem by introducing a deep residual learning framework. Instead of hoping each few stacked layers directly fit a desired underlying mapping, we explicitly let these layers fit a residual mapping.

在本文中,我们通过引入深度残差学习框架解决了退化问题。我们明确地让这些层拟合残差映射,而不是希望每几个堆叠的层直接拟合期望的基础映射。

We hypothesize that it is easier to optimize the residual mapping than to optimize the original, unreferenced mapping. To the extreme, if an identity mapping were optimal, it would be easier to push the residual to zero than to fit an identity mapping by a stack of nonlinear layers.

我们假设残差映射比原始的、未参考的映射更容易优化。在极端情况下,如果一个恒等映射是最优的,那么将残差置为零比通过一堆非线性层来拟合恒等映射更容易。

The formulation of F(x)+x F ( x ) + x can be realized by feedforward neural networks with “shortcut connections” (Fig. 2). Shortcut connections [2, 33, 48] are those skipping one or more layers. In our case, the shortcut connections simply perform identity mapping, and their outputs are added to the outputs of the stacked layers (Fig. 2). Identity shortcut connections add neither extra parameter nor computational complexity. The entire network can still be trained end-to-end by SGD with backpropagation, and can be easily implemented using common libraries (e.g., Caffe [19]) without modifying the solvers.

公式 F(x)+x F ( x ) + x 可以通过带有“快捷连接”的前向神经网络(图2)来实现。快捷连接[2, 33, 48]是那些跳过一层或更多层的连接。在我们的案例中,快捷连接简单地执行恒等映射,并将其输出添加到堆叠层的输出(图2)。恒等快捷连接既不增加额外的参数也不增加计算复杂度。整个网络仍然可以由带有反向传播的SGD进行端到端的训练,并且可以使用公共库(例如,Caffe [19])轻松实现,而无需修改求解器。

Residual Representations. In image recognition, VLAD [18] is a representation that encodes by the residual vectors with respect to a dictionary, and Fisher Vector [30] can be formulated as a probabilistic version [18] of VLAD. Both of them are powerful shallow representations for image retrieval and classification [4, 47]. For vector quantization, encoding residual vectors [17] is shown to be more effective than encoding original vectors.

残差表示。在图像识别中,VLAD[18]是一种通过关于字典的残差向量进行编码的表示形式,Fisher矢量[30]可以表示为VLAD的概率版本[18]。它们都是图像检索和图像分类[4,47]中强大的浅层表示。对于矢量量化,编码残差矢量[17]被证明比编码原始矢量更有效。

Shortcut Connections. Practices and theories that lead to shortcut connections [2, 33, 48] have been studied for a long time. An early practice of training multi-layer perceptrons (MLPs) is to add a linear layer connected from the network input to the output [33, 48]. In [43, 24], a few intermediate layers are directly connected to auxiliary classifiers for addressing vanishing/exploding gradients. The papers of [38, 37, 31, 46] propose methods for centering layer responses, gradients, and propagated errors, implemented by shortcut connections. In [43], an “inception” layer is composed of a shortcut branch and a few deeper branches.

快捷连接。导致快捷连接[2,33,48]的实践和理论已经被研究了很长时间。训练多层感知机(MLP)的早期实践是添加一个线性层来连接网络的输入和输出[33,48]。在[43,24]中,一些中间层直接连接到辅助分类器,用于解决梯度消失/爆炸。论文[38,37,31,46]提出了通过快捷连接实现层间响应,梯度和传播误差的方法。在[43]中,一个“inception”层由一个快捷分支和一些更深的分支组成。

Although both forms should be able to asymptotically approximate the desired functions (as hypothesized), the ease of learning might be different.

尽管两种形式应该都能渐近地近似要求的函数(如假设),但学习的难易程度可能是不同的。

This reformulation is motivated by the counterintuitive phenomena about the degradation problem (Fig. 1, left). As we discussed in the introduction, if the added layers can be constructed as identity mappings, a deeper model should have training error no greater than its shallower counterpart. The degradation problem suggests that the solvers might have difficulties in approximating identity mappings by multiple nonlinear layers. With the residual learning reformulation, if identity mappings are optimal, the solvers may simply drive the weights of the multiple nonlinear layers toward zero to approach identity mappings.

关于退化问题的反直觉现象激发了这种重构(图1左)。正如我们在引言中讨论的那样,如果添加的层可以被构建为恒等映射,更深模型的训练误差应该不大于它对应的更浅版本。退化问题表明求解器通过多个非线性层来近似恒等映射可能有困难。通过残差学习的重构,如果恒等映射是最优的,求解器可能简单地将多个非线性连接的权重推向零来接近恒等映射。

In real cases, it is unlikely that identity mappings are optimal, but our reformulation may help to precondition the problem. If the optimal function is closer to an identity mapping than to a zero mapping, it should be easier for the solver to find the perturbations with reference to an identity mapping, than to learn the function as a new one.

在实际情况下,恒等映射不太可能是最优的,但是我们的重构可能有助于对问题进行预处理。如果最优函数比零映射更接近于恒等映射,则求解器应该更容易找到关于恒等映射的抖动,而不是将该函数作为新函数来学习。

We adopt residual learning to every few stacked layers.

我们每隔几个堆叠层采用残差学习。

The shortcut connections neither extra parameter nor computation complexity.

快捷连接既没有引入外部参数又没有增加计算复杂度。

the identity mapping is sufficient for addressing the degradation problem and is economical.

恒等映射足以解决退化问题,并且是合算的。

It is worth noticing that our model has fewer filters and lower complexity than VGG nets.

值得注意的是我们的模型与VGG网络(图3左)相比,有更少的滤波器和更低的复杂度。

Residual Network. Based on the above plain network, we insert shortcut connections (Fig. 3, right) which turn the network into its counterpart residual version. The identity shortcuts (Eqn.(1)) can be directly used when the input and output are of the same dimensions (solid line shortcuts in Fig. 3). When the dimensions increase (dotted line shortcuts in Fig. 3), we consider two options: (A) The shortcut still performs identity mapping, with extra zero entries padded for increasing dimensions. This option introduces no extra parameter; (B) The projection shortcut in Eqn.(2) is used to match dimensions (done by 1×1 convolutions). For both options, when the shortcuts go across feature maps of two sizes, they are performed with a stride of 2.

残差网络。 基于上述的简单网络,我们插入快捷连接(图3,右),将网络转换为其对应的残差版本。当输入和输出具有相同的维度时(图3中的实线快捷连接)时,可以直接使用恒等快捷连接(方程(1))。当维度增加(图3中的虚线快捷连接)时,我们考虑两个选项:(A)快捷连接仍然执行恒等映射,额外填充零输入以增加维度。此选项不会引入额外的参数;(B)方程(2)中的投影快捷连接用于匹配维度(由1×1卷积完成)。对于这两个选项,当快捷连接跨越两种尺寸的特征图时,它们执行时步长为2。

Our implementation for ImageNet follows the practice in [21, 40]. The image is resized with its shorter side randomly sampled in [256, 480] for scale augmentation [40]. A 224×224 crop is randomly sampled from an image or its horizontal flip, with the per-pixel mean subtracted [21]. The standard color augmentation in [21] is used. We adopt batch normalization (BN) [16] right after each convolution and before activation, following [16]. We initialize the weights as in [12] and train all plain/residual nets from scratch. We 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, and the models are trained for up to 60×104 iterations. We use a weight decay of 0.0001 and a momentum of 0.9. We do not use dropout [13], following the practice in [16].

ImageNet中我们的实现遵循[21,40]的实践。调整图像大小,其较短的边在[256,480]之间进行随机采样,用于尺度增强[40]。224×224裁剪是从图像或其水平翻转中随机采样,并逐像素减去均值[21]。使用了[21]中的标准颜色增强。在每个卷积之后和激活之前,我们采用批量归一化(BN)[16]。我们按照[12]的方法初始化权重,从零开始训练所有的简单/残差网络。我们使用批大小为256的SGD方法。学习速度从0.1开始,当误差稳定时学习率除以10,并且模型训练高达60×104次迭代。我们使用的权重衰减为0.0001,动量为0.9。根据[16]的实践,我们不使用丢弃[13]。

相关参考

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值