深度学习经典模型之Alexnet
有任何GTP需要,看我简介
1 AlexNet
1.1 模型介绍
AlexNet是由Alex Krizhevsky提出的一种开创性的图像分类深度卷积神经网络。该网络于2012年的ImageNet大规模视觉识别竞赛中首次以15.3%的top-5测试错误率获得了冠军^{[2]}$。采用GPU替代CPU进行计算使得模型结构更加复杂从而推动了深度学习的发展这一发现不仅证明了深度卷积神经网络的有效性还使CNN在计算机视觉领域得到了广泛应用并引发了机器学习领域的革命性变革
1.2 模型结构

图1.1 AlexNet网络结构图
如图4.3所示, 除了下采样(池化层)以及局部响应规范化操作(Local Responsible Normalization, LRN)之外,AlexNet总共包含8个层, 其中前5个卷积层, 剩余的3个全连接层. 网络结构分为上下两部分, 分别对应两个GPU的操作流程, 在中间某些特定的层级(如C3C_3卷积层与F6−8F_{6-8}全连接层级之间存在GPU间的数据交互)之外, 其他层级均独立分配至两个GPU进行计算. 最终, 最后一层全连接层级的输出将作为softmax函数的输入端口, 从而生成1000个图像分类标签的概率分布结果. 不考虑基于GPU并行设计优化的研究,AlexNet的整体架构设计与LeNet有高度相似之处, 如表4.2所示列出了其具体的参数配置信息.
表1.2 AlexNet网络参数配置
| 网络层 | 输入尺寸 | 核尺寸 | 输出尺寸 | 可训练参数量 |
|---|---|---|---|---|
| 卷积层C1C_1 ∗^* | 224×224×3224\times224\times3 | 11×11×3/4,48(×2GPU)11\times11\times3/4,48(\times2_{GPU}) | 55×55×48(×2GPU)55\times55\times48(\times2_{GPU}) | (11×11×3+1)×48×2(11\times11\times3+1)\times48\times2 |
| 下采样层SmaxS_{max}∗^* | 55×55×48(×2GPU)55\times55\times48(\times2_{GPU}) | 3×3/2(×2GPU)3\times3/2(\times2_{GPU}) | 27×27×48(×2GPU)27\times27\times48(\times2_{GPU}) | 0 |
| 卷积层C2C_2 | 27×27×48(×2GPU)27\times27\times48(\times2_{GPU}) | 5×5×48/1,128(×2GPU)5\times5\times48/1,128(\times2_{GPU}) | 27×27×128(×2GPU)27\times27\times128(\times2_{GPU}) | (5×5×48+1)×128×2(5\times5\times48+1)\times128\times2 |
| 下采样层SmaxS_{max} | 27×27×128(×2GPU)27\times27\times128(\times2_{GPU}) | 3×3/2(×2GPU)3\times3/2(\times2_{GPU}) | 13×13×128(×2GPU)13\times13\times128(\times2_{GPU}) | 0 |
| 卷积层C3C_3 ∗^* | 13×13×128×2GPU13\times13\times128\times2_{GPU} | 3×3×256/1,192(×2GPU)3\times3\times256/1,192(\times2_{GPU}) | 13×13×192(×2GPU)13\times13\times192(\times2_{GPU}) | (3×3×256+1)×192×2(3\times3\times256+1)\times192\times2 |
| 卷积层C4C_4 | 13×13×192(×2GPU)13\times13\times192(\times2_{GPU}) | 3×3×192/1,192(×2GPU)3\times3\times192/1,192(\times2_{GPU}) | 13×13×192(×2GPU)13\times13\times192(\times2_{GPU}) | (3×3×192+1)×192×2(3\times3\times192+1)\times192\times2 |
| 卷积层C5C_5 | 13×13×192(×2GPU)13\times13\times192(\times2_{GPU}) | 3×3×192/1,128(×2GPU)3\times3\times192/1,128(\times2_{GPU}) | 13×13×128(×2GPU)13\times13\times128(\times2_{GPU}) | (3×3×192+1)×128×2(3\times3\times192+1)\times128\times2 |
| 下采样层SmaxS_{max} | 13×13×128(×2GPU)13\times13\times128(\times2_{GPU}) | 3×3/2(×2GPU)3\times3/2(\times2_{GPU}) | 6×6×128(×2GPU)6\times6\times128(\times2_{GPU}) | 0 |
| 全连接层F6F_6 ∗^* | 6×6×128×2GPU6\times6\times128\times2_{GPU} | 9216×2048(×2GPU)9216\times2048(\times2_{GPU}) | 1×1×2048(×2GPU)1\times1\times2048(\times2_{GPU}) | (9216+1)×2048×2(9216+1)\times2048\times2 |
| 全连接层F7F_7 | 1×1×2048×2GPU1\times1\times2048\times2_{GPU} | 4096×2048(×2GPU)4096\times2048(\times2_{GPU}) | 1×1×2048(×2GPU)1\times1\times2048(\times2_{GPU}) | (4096+1)×2048×2(4096+1)\times2048\times2 |
| 全连接层F8F_8 | 1×1×2048×2GPU1\times1\times2048\times2_{GPU} | 4096×10004096\times1000 | 1×1×10001\times1\times1000 | (4096+1)×1000×2(4096+1)\times1000\times2 |
卷积层C1接收输入为大小为224×224×3的图片数据,在两个GPU上分别应用核尺寸为11×11×3、步长为4的卷积操作后得到两条独立输出数据集分别为55×55×48维度的空间特征图。
下采样层Smax实际上是嵌套在卷积操作中的最大池化模块,并特别地单独列出以区分未进行最大池化的其他卷积层。
在经过C1−2卷积层后的池化操作(在ReLU激活之前),还有一个归一化局部响应网络(LRN)操作用于对相邻特征点进行归一化处理。
相比之下,卷积层C3接收的数据来源与常规卷积层不同,在该层中来自两个GPU的结果被融合在一起作为输入信号;其滤波器通道维度达到384。
全连接层F6−8接收的数据尺寸与C3相似,在该过程中来自两个GPU方向上的输出结果被整合作为全连接运算的输入。
1.3 模型特性
- 所有卷积层均采用了ReLU作为非线性激活函数,在提高模型运行效率的同时也显著提升了收敛速度。
- 将模型部署至多块GPU上进行并行训练,在提升整体训练效率的同时也扩大了可处理的数据规模。
- 通过LRN对局部特征进行归一化处理后传递给ReLU激活单元,在此过程中能够有效降低分类错误率。
- 采用重叠最大池化机制(overlapping max pooling),其满足池化范围z与步长s之间的关系式z > sz > s(例如SmaxS_{max}核尺寸设定为3×3/2),这种设计方式能够有效避免平均池化所带来的平滑效应。
- 通过随机丢弃技术(dropout)有意识地抑制神经网络在训练过程中出现过拟合现象。
有任何GTP需要,看我简介
