1. 程式人生 > >paper reading----Xception: Deep Learning with Depthwise Separable Convolutions

paper reading----Xception: Deep Learning with Depthwise Separable Convolutions

module 之間 pap AD lin reg arch dual pooling

背景以及問題描述:

Inception-style models的基本單元是Inception module。Inception model是Inception module堆砌而成,這與VGG-style network這種由簡單的conv layer堆砌而成的網絡不一樣。雖然Inception modules在概念上還是卷積,用於卷積特征的提取,能夠利用更少的參數來學習更加richer的表達。那麽他們到底是怎麽做到的呢?他們與regular convolution有什麽不同呢?Inception之後應該跟那些strategies呢?

Inception Hypothesis:

卷積層學習的是3D空間中的filters,兩個spatial dimension,一個channel dimension。single filter kernel既要mapping cross-channel correlations,又要mapping spatial correlation。Inception背後的想法是將這個過程簡化,使之更有效,采取的策略是,對cross-channel correlation mapping和spatial correlation mapping進行分離,首先通過1*1的conv探索cross-channel correlation,然後把數據在channel這個維度上進行劃分,分成三四個segment,對每個segment單獨進行3*3的卷積操作,來同時探索spatial correlation和cross-channel correlation。這樣能夠減少參數的個數,同時能夠對corss-channel correlation和spatial correlation進行有效的decouple。

Regular Conv和Separable Conv之中

技術分享圖片技術分享圖片

技術分享圖片技術分享圖片

Inception module有不同的形式,考慮Inception V3中的典型的形式如圖1,去掉avgpooling後,可簡化為圖2的形式。簡化形式完全等價於圖3的形式, 圖3的一個極端形式(extreme inception, i.e. Xception)如圖4所示。值得註意的是,圖4幾乎與depthwise separable conv identical。差別在於:

l 操作順序有區別:depthwise separable conv 通常先執行channel-wise spatial conv,然後再執行1*1的卷積;而Inception則是先執行1*1的卷積;

l 第一個操作後有無ReLU. Inception中兩個卷積操作後均有ReLU; 而channel-waise separable conv在第一個操作後沒ReLU。

作者認為第一個差別並不重要,第二個差異可能是關鍵。而且作者認為在regular conv與depthwise separable conv之間存在一個discrete spectrum,parameterized by 用於執行spatial convolution的獨立的channel-space segments。regular conv(先於1*1convolution)對應於所有的channel捆在一起當成一個segment的情況;depthwise separable conv是一個channel對應一個segment的情況,這兩類情況屬於兩個極端,而Inception位於兩者之間,將channels分成少數幾個segments,然後分別進行卷積。這種中間狀態的屬性至今沒有被探索過。

基於這個觀察,可以認為用depthwise separable conv替換Inception Module可能會對Inception family of architectures有提升。本文的主要工作就是present a CNN architecture based on this idea.

The Xception architecture

一言以蔽之,一個用depthwise separable conv堆砌的,加了residual connection的architecture. 如圖5所示。coding: https://github.com/kwotsin/TensorFlow-Xception

實驗設置:

Dropout: ImageNet上訓練的時候,在logistic regression之前包含一個dropout layer,rate=0.5,但是在JFT數據集(包含350million個圖像)上,沒有dropout,理由是 數據集很大,in any reasonable amount of time下,不可能overfitting,事實上,這麽大的數據集,在60 NVIDIA K80 GPUs這樣的硬件條件下,要把網絡訓練到full convergence, 需要三個多月的時間了,本文才訓練了一個月,當然不可能overfitting.

技術分享圖片

paper reading----Xception: Deep Learning with Depthwise Separable Convolutions