Paper | Xception: Deep Learning with Depthwise Separable Convolutions

Xception: Deep Learning with Depthwise Separable Convolutions

这篇论文写得很好。只要你知道卷积操作或公式,哪怕没看过Inception,也能看懂。

核心贡献:从Inception的思想:剥离时序卷积和空域卷积 得到启发,提出了Xception(Extreme Inception),希望能彻底解耦二者。

其他贡献:

  1. 本文提供了关于Inception的一种解释。

  2. 讨论了与现有深度可分离卷积的区别,并指出其最大影响因素是两层卷积之间的非线性化。

  3. 在两个图像分类数据库上的效果都超越了Inception V3,但参数量是一样的。

故事

Inception结构和思想

Inception结构的演进:In-Network[11] => 2014年GooLeNet(V1)[20] => Inception V2[7] => Inception V3[21] => Inception-ResNet[19]。

首先我们应该知道:一般的卷积实际上是在同时完成 通道互相关 和 空域 互相关。

A convolution layer attempts to learn filters in a 3D space, with 2 spatial dimensions (width and height) and a channel dimension; thus a single convolution kernel is tasked with simultaneously mapping cross-channel correlations and spatial correlations.

这是基础。如果这一点不清楚,后面就没法看啦。

Inception的核心思想,就是解耦这两个操作:先做多个\(1 \times 1\)卷积,得到多个通道互相关结果;然后再对这些结果进行空域互相关操作。

It first looks at cross-channel correlations via a set of \(1 \times 1\) convolutions, mapping the input data into 3 or 4 separate spaces that are smaller than the original input space, and then maps all correlations in these smaller 3D spaces, via regular 3x3 or 5x5 convolutions.
In effect, the fundamental hypothesis behind Inception is that cross-channel correlations and spatial correlations are sufficiently decoupled that it is preferable not to map them jointly.

Inception

看图应该就明白了。最好能提前熟悉\(1 \times 1\)卷积的原理和应用。

补充:V3有一些变种的思想是类似的,但不一样:它是希望解耦height-wise和width-wise的卷积,方法是级联\(7 \times 1\)\(1 \times 7\)的卷积。

更进一步,以及现有的深度可分离卷积

上图可以等价为下图3所示的两步:

  1. 用一个\(1 \times 1\)卷积,得到很多通道;

  2. 将这些通道分成几份(几百个通道分成3、4份),然后对每一份做正常的卷积(既包含空域,也有一定的通道互相关,但是少很多)。

既然如此,我们为什么不更进一步呢?我们让空域卷积只在单个通道上操作,即完全不含任何通道互相关信息。如图4:

改进

值得一提的是,TensorFlow和Keras里已经内置了类似的结构,称为深度可分离卷积。有两点不同:

  1. 通道互相关卷积 和 空域卷积 的顺序。现存结构中,空域卷积在前。

  2. 两层卷积之间是否有ReLU非线性。现存结构中,两层卷积中间没有ReLU激活。注意,Inception内每一层卷积后一般都有。

作者将展示:第一点无关紧要,然而第二点非常重要。

Xception结构

Xception

  1. 36层卷积。Entry flow进行一次(8层卷积),Middle flow重复8次(24层卷积),最后是Exit flow(4层卷积)。由于是分类任务,最后跟了FC层和逻辑回归。

  2. 一共有14个module包裹这36个卷积层。每个module都有头尾短连接。

实验

实验和V3比较,并且保证参数数量基本一致。优化方法都沿袭V3的方法。

实验结果:Xception更快、更好。

更好

更快

各模块的短连接有必要:

短连接

在 depthwise 和 pointwise 卷积之间的非线性激活是不好的。取消非线性激活,可以让收敛速度更快,效果更好:

不要非线性激活

这一点和Inception的报告是相反的。可能的原因是:Inception是将几百个通道分成3-4份,每一份都很多。因此非线性对于这种深度学习是有帮助的。但是,Xception的空域卷积只对单通道操作,深度不足,非线性反而会让信息丢失。

posted @ 2019-10-23 11:17  RyanXing  阅读(510)  评论(0编辑  收藏  举报