文章目录
1 模型介绍
LeNet-5出自论文《Gradient-Based Learning Applied to Document Recognition》,是由 L e C u n LeCun LeCun 于1998年提出的一种用于识别手写数字和机器印刷字符的卷积神经网络,其命名来源于作者 L e C u n LeCun LeCun的名字,5则是其研究成果的代号,在LeNet-5之前还有LeNet-4和LeNet-1鲜为人知。LeNet-5阐述了图像中像素特征之间的相关性能够由参数共享的卷积操作所提取,同时使用卷积、下采样(池化)和非线性映射这样的组合结构,是当前流行的大多数深度图像识别网络的基础。
2 模型结构
LeNet-5虽然是早期提出的一个小网络,但是却包含了深度学习卷积神经网络的基本模块:卷积层
、池化层
和全连接层
。如图1所示,LeNet-5一共包含7层(输入层不作为网络结构),分别由2个卷积层、2个池化层和3个连接层组成,网络的参数配置如表1所示,其中下采样层和全连接层的核尺寸分别代表采样范围和连接矩阵的尺寸。
Layer Name | Kernel Size | Kernel Num | Stride | Padding | Input Size | Output Size | Trainable params |
---|---|---|---|---|---|---|---|
C 1 C_1 C1 | 5 × 5 5\times5 5×5 | 6 6 6 | 1 1 1 | 0 0 0 | 32 × 32 × 1 32\times32\times1 32×32×1 | 28 × 28 × 6 28\times28\times6 28×28×6 | ( 5 × 5 × 1 + 1 ) × 6 (5\times5\times1+1)\times6 (5×5×1+1)×6 |
S 2 S_2 S2 | 2 × 2 2\times2 2×2 | / / / | 2 2 2 | 0 0 0 | 28 × 28 × 6 28\times28\times6 28×28×6 | 14 × 14 × 6 14\times14\times6 14×14×6 | ( 1 + 1 ) × 6 (1+1)\times6 (1+1)×6 |
C 3 C_3 C3 | 5 × 5 5\times5 5×5 | 16 16 16 | 1 1 1 | 0 0 0 | 14 × 14 × 6 14\times14\times6 14×14×6 | 10 × 10 × 16 10\times10\times16 10×10×16 | 1516 1516 1516 |
S 4 S_4 S4 | 2 × 2 2\times2 2×2 | / / / | 2 | 0 0 0 | 10 × 10 × 16 10\times10\times16 10×10×16 | 5 × 5 × 16 5\times5\times16 5×5×16 | ( 1 + 1 ) × 16 (1+1)\times16 (1+1)×16 |
C 5 C_5 C5 | 5 × 5 5\times5 5×5 | 120 120 120 | 1 | 0 0 0 | 5 × 5 × 16 5\times5\times16 5×5×16 | 1 × 1 × 120 1\times1\times120 1×1×120 | ( 5 × 5 × 16 + 1 ) × 120 (5\times5\times16+1)\times120 (5×5×16+1)×120 |
F 6 F_6 F6 | / / / | / / / | / / / | / / / | 1 × 1 × 120 1\times1\times120 1×1×120 | 1 × 1 × 84 1\times1\times84 1×1×84 | ( 120 + 1 ) × 84 (120+1)\times84 (120+1)×84 |
O u t p u t Output Output | / / / | / / / | / / / | / / / | 1 × 1 × 84 1\times1\times84 1×1×84 | 1 × 1 × 10 1\times1\times10 1×1×10 | ( 84 + 1 ) × 10 (84+1)\times10 (84+1)×10 |
接下来,分别详解各层参数
1、卷积层 C 1 C_1 C1
2、下采样层 S 2 S_2 S2
3、卷积层 C 3 C_3 C3
4、下采样层 S 4 S_4 S4
5、卷积层 C 5 C_5 C5
6、全连接层 F 6 F_6 F6和 O u t p u t Output Output
3 模型特性
- 卷积网络使用一个3层的序列组合:卷积、下采样(池化)、非线性映射(LeNet-5最重要的特性,奠定了目前深层卷积网络的基础)
- 使用卷积提取空间特征
- 使用映射的空间均值进行下采样
- 使用 t a n h tanh tanh或 s i g m o i d sigmoid sigmoid进行非线性映射
- 多层神经网络(MLP)作为最终的分类器
- 层间的稀疏连接矩阵以避免巨大的计算开销