背景
There exists a solution by construction to the deeper model: the added layers are constructed as identity mappings, 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.
CNN可以提取到不同层级的特征(low/mid/high level),且网络层数越高,提取到的特征语义信息越丰富。然而研究者发现,当网络不断加深时,网络的training error与test error均增大。这并不是因为过拟合,因为过拟合的话应该是training error减小,test error增大,而且这种现象还会随着深度加深而变差。这并不符合逻辑,因为可以把深层网络看做一个浅层网络+由增加的层组成的恒等变换,深层网络的训练误差至少也能达到与浅层网络一样的训练误差才对。而深层网络显然没有把这种恒等变换学习到。因此出现了ResNet,它的存在本质上就是学习到这个恒等变换。
ResNet
当一个深层网络后面的那些层是恒等变换,那么深层网络就退化为了一个浅层网络。现在要解决的就是学习恒等变换函数了。多层的神经网络理论上可以拟合任意函数,若直接让一些层去拟合一个潜在的恒等变换函数H(x) = x