引言
一个基于神经网络模型的视觉模型中,卷积和归一化层是最为耗时的两种layer。卷积数据计算密集类型,今年来大量的优化主要集中在各种设备上的卷积加速。
归一化层通过计算一个批量中的均值与方差来进行特征归一化。众多实践证明,它利于优化且使得深度网络易于收敛。批统计的随机不确定性也作为一个有利于泛化的正则化项。BN 已经成为了许多顶级计算机视觉算法的基础。添加归一化层作为提高算法性能的很好的一种策略,但由于像BN遭受数据同步延时的问题,现在逐渐被一些新的normalization方式所替代。
卷积
认识卷积
卷积定义
h ( x ) = f ( x ) ∗ g ( x ) = ∫ − ∞ + ∞ f ( t ) g ( x − t ) d t h(x) = f(x)*g(x) = \int_{ - \infty }^{ + \infty } {f(t)g(x - t)dt} h(x)=f(x)∗g(x)=∫−∞+∞f(t)g(x−t)dt
f ( t ) f(t) f(t)先不动, g ( − t ) g(-t) g(−t)相当于 g ( t ) g(t) g(t)函数的图像沿y轴(t=0)做了一次翻转。 g ( x − t ) g(x-t) g(x−t)相当于 g ( − t ) g(-t) g(−t)的整个图像沿着t轴进行了平移,向右平移了x个单位。他们相乘之后围起来的面积就是 h ( x ) h(x) h(x)。
离散卷积的定义
h ( x ) = f ( x ) ∗ g ( x ) = ∑ τ = − ∞ + ∞ f ( τ ) g ( x − τ ) h(x) = f(x)*g(x) = \sum_{\tau = -\infty}^{+\infty}f(\tau)g(x-\tau) h(x)=f(x)∗g(x)=τ=−∞∑+∞f(τ)g(x−τ)
其实,深度学习中的卷积对应于数学中的cross correlation. 从卷积的定义来看,我们当前在深度学习中训练的卷积核是翻转之后的卷积核。
下面是一些介绍卷积的文章和常见卷积类型统计表:
- A Comprehensive Introduction to Different Types of Convolutions in Deep Learning
- A Tutorial on Filter Groups (Grouped Convolution)
- AlexNet
- MobileNet
- An Introduction to different Types of Convolutions in Deep Learning
- Convolution arithmetic
- Deconvolution and Checkerboard Artifacts
Convolution Name | 参考文献 | 典型代表 | 附录 |
---|---|---|---|
Convolution | AlexNet, VGG | ||
1x1 | Network in Network | GoogLeNet, Inception | (1). Dimensionality reduction for efficient computations; (2).Efficient low dimensional embedding, or feature pooling; (3). Applying nonlinearity again after convolution |
Dilated convolution | Multi-Scale Context Aggregation by Dilated Convolutions | 语义分割 | support exponentially expanding receptive fields without losing resolution or coverage. Upsampling/poolinglayer(e.g. bilinear interpolation) is deterministic. (a.k.a. not learnable); 内部数据结构丢失, 空间层级化信息丢失; 小物体信息无法重建 (假设有四个pooling layer则任何小于 2 4 = 16 2^4=16 24= |