這篇論文是2016cvpr最佳論文,該論文提出了一種殘差網(wǎng)絡的模型鹏溯,很大程度上解決了深度網(wǎng)絡難以學習的問題罢维。作者使用152的殘差網(wǎng)絡在2015 ImageNet 分類和檢測的比賽中均獲得第一名。
退化問題
隨著網(wǎng)絡深度加深丙挽,網(wǎng)絡的訓練準確率卻不斷下降肺孵,這個問題不是由過擬合引起的。
這種現(xiàn)象是不合理的颜阐。
假設我們有淺層網(wǎng)絡Net1平窘,深層網(wǎng)絡Net2,我們讓Net1完全替代Net2的前半部分網(wǎng)絡凳怨,Net2的后半部分網(wǎng)絡我們做恒等映射瑰艘。那么Net2的訓練準確率應比Net1高(至少不比Net1低)。但實際訓練情況并非如此肤舞。
這說明紫新,并不是所有的網(wǎng)絡都易于優(yōu)化。
殘差學習
作者提出了下面的網(wǎng)絡模型
網(wǎng)絡的期望輸出是H(x)李剖,我們讓F(x) + x去擬合H(x)芒率,即 H(x) := F(x) + x。
有 F(x) := H(x) - x
假設恒等映射是最優(yōu)解杖爽,那么敲董,訓練殘差函數(shù)F(x)等于零要比在一個多層非線性網(wǎng)絡上訓練恒等映射要容易紫皇。
解決x與F(x)維度不等的問題
作者給出兩種解決方案
identity mapping
通過給低維的x加0來增加維度,這種方式不會增加多余的參數(shù)腋寨;(parameter-free)projection shortcut
給x乘以一個投影矩陣:
實驗表明:identity mapping is sufficient for addressing the degradation problem and is economical, and thus Ws is only used when matching dimensions.
網(wǎng)絡結構
左邊是VGG-19網(wǎng)絡聪铺,中間是沒有shortcut-connection的平凡網(wǎng)絡(plain net),右邊是34層的殘差網(wǎng)絡(ResNet-34)萄窜。
作者說ResNet-34 與VGG相比有更少的卷積核和更低的復雜度铃剔,與VGG-19相比參數(shù)減少18%。那當然了查刻,人VGG-19有兩個4096的全連接層键兜,你雖然深,但都是卷積核啊穗泵。
實驗-ImageNet Classification
一些基本設置
- 數(shù)據(jù)增強
- adopt batch normalization right after each convolution and before activation
- use SGD with a mini-batch size of 256
- the learning reate 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
- do not use dropout
Residual Networks 實驗一:Plain Net vs. ResNet
18-layer和34-layer 殘差網(wǎng)絡普气,基本結構與plain net類似,應用identity mapping 實現(xiàn) shortcuts佃延,因此相比plain net沒有增加參數(shù)现诀。
由Figure4的結果可知:
- ResNet很好的解決了退化問題,并且隨著深度加深履肃,準確率增高仔沿;
- 與Plain Net相比,ResNet-34 error減小了3.5%尺棋,這說明殘差學習在極深度網(wǎng)絡中的有效性封锉;
- 與Plain Net相比,RestNet能夠更快的收斂膘螟。
Residual Networks 實驗二:Identity mapping vs. Projection Shortcuts
A:需要升維的shortcuts使用zero-padding方式成福,其他的shortcuts使用identity mapping方式,沒有參數(shù)增加萍鲸;
B:需要升維的shortcuts使用projection闷叉,其他shortcuts使用identity mapping擦俐;
C:所有的shortcuts都使用projection脊阴。
Small differences among A/B/C indicate that projection shortcuts are not essential for addressing the degradation problem.
Residual Networks 實驗三:Deeper BottleNeck Architectures
這個就是設計的152層的網(wǎng)絡,top-1的錯誤率19.38%蚯瞧,top-5錯誤率4.49%嘿期,據(jù)說已經超過了人眼的識別水平。
實驗-CIFAR-10 and Analysis
然后作者又設計了一個1000多層的網(wǎng)絡并在CIFAR-10數(shù)據(jù)集上進行訓練埋合,誤差率比千層網(wǎng)絡高了一點备徐,作者猜測是數(shù)據(jù)集太小過擬合了。想想也是甚颂,拿大炮打蚊子效果肯定不好蜜猾。作者的原話是“We argure that this is because of overfitting. The 1202-layer network may be unnecessarily large(19.4M) for this small dataset.”
然后作者又做了個分析秀菱,輸出了一下每層卷基層的輸出的標準差,見下圖蹭睡。
層數(shù)越深衍菱,標準差越小。這似乎說明了什么肩豁,作者的結論是:These results support our basic motivation that the residual functions might be generally closer to zero than the non-residual functions.
說實話脊串,我沒怎么理解,因為你拿到的是標準差不是均值清钥,標準差小只說明輸出的數(shù)據(jù)比較聚合而已琼锋,怎么能說說明趨近于0呢?