[论文翻译]基于深度卷积神经网络的ImageNet分类


原文地址:https://proceedings.neurips.cc/paper_files/paper/2012/file/c399862d3b9d6b76c8436e924a68c45b-Paper.pdf


ImageNet Classification with Deep Convolutional Neural Networks

基于深度卷积神经网络的ImageNet分类

Alex Krizhevsky University of Toronto kriz@cs.utoronto.ca

Alex Krizhevsky 多伦多大学 kriz@cs.utoronto.ca

Ilya Sutskever University of Toronto ilya@cs.utoronto.ca

Ilya Sutskever 多伦多大学 ilya@cs.utoronto.ca

Geoffrey E. Hinton University of Toronto hinton@cs.utoronto.ca

Geoffrey E. Hinton 多伦多大学 hinton@cs.utoronto.ca

Abstract

摘要

We trained a large, deep convolutional neural network to classify the 1.2 million high-resolution images in the ImageNet LSVRC-2010 contest into the 1000 different classes. On the test data, we achieved top-1 and top-5 error rates of $37.5%$ and $17.0%$ which is considerably better than the previous state-of-the-art. The neural network, which has 60 million parameters and 650,000 neurons, consists of five convolutional layers, some of which are followed by max-pooling layers, and three fully-connected layers with a final 1000-way softmax. To make training faster, we used non-saturating neurons and a very efficient GPU implementation of the convolution operation. To reduce over fitting in the fully-connected layers we employed a recently-developed regular iz ation method called “dropout” that proved to be very effective. We also entered a variant of this model in the ILSVRC-2012 competition and achieved a winning top-5 test error rate of $15.3%$ , compared to $26.2%$ achieved by the second-best entry.

我们训练了一个大型深度卷积神经网络,将ImageNet LSVRC-2010竞赛中的120万张高分辨率图像分类为1000个不同类别。在测试数据上,我们取得了$37.5%$的top-1错误率和$17.0%$的top-5错误率,显著优于此前的最先进水平。该神经网络包含6000万个参数和65万个神经元,由五个卷积层(部分层后接最大池化层)和三个全连接层(最终采用1000路softmax)组成。为加速训练,我们使用了非饱和神经元和高度优化的GPU卷积运算实现。为减少全连接层的过拟合,我们采用了一种名为"dropout"的新型正则化方法,效果显著。我们还以该模型的改进版本参加了ILSVRC-2012竞赛,并以$15.3%$的top-5测试错误率夺冠,而第二名成绩为$26.2%$。

1 Introduction

1 引言

Current approaches to object recognition make essential use of machine learning methods. To improve their performance, we can collect larger datasets, learn more powerful models, and use better techniques for preventing over fitting. Until recently, datasets of labeled images were relatively small — on the order of tens of thousands of images (e.g., NORB [16], Caltech-101/256 [8, 9], and CIFAR-10/100 [12]). Simple recognition tasks can be solved quite well with datasets of this size, especially if they are augmented with label-preserving transformations. For example, the currentbest error rate on the MNIST digit-recognition task $(<0.3%)$ approaches human performance [4]. But objects in realistic settings exhibit considerable variability, so to learn to recognize them it is necessary to use much larger training sets. And indeed, the shortcomings of small image datasets have been widely recognized (e.g., Pinto et al. [21]), but it has only recently become possible to collect labeled datasets with millions of images. The new larger datasets include LabelMe [23], which consists of hundreds of thousands of fully-segmented images, and ImageNet [6], which consists of over 15 million labeled high-resolution images in over 22,000 categories.

当前的目标识别方法主要依赖于机器学习技术。为提升性能,我们可以收集更大规模的数据集、训练更强大的模型,并采用更有效的防过拟合技术。直到最近,标注图像数据集的规模仍相对较小——约数万量级(例如NORB [16]、Caltech-101/256 [8,9]和CIFAR-10/100 [12])。对于简单识别任务,这类规模的数据集已能取得较好效果,特别是辅以标签保持的数据增强时。例如MNIST手写数字识别任务当前最佳错误率$(<0.3%)$已接近人类水平[4]。但现实场景中的物体存在显著多样性,要准确识别它们必须使用更庞大的训练集。事实上,小规模图像数据集的缺陷已被广泛认知(如Pinto等[21]),但直到近年才具备收集数百万标注图像的能力。新兴的大规模数据集包括包含数十万全分割图像的LabelMe [23],以及涵盖22000多个类别、超过1500万张高分辨率标注图像的ImageNet [6]。

To learn about thousands of objects from millions of images, we need a model with a large learning capacity. However, the immense complexity of the object recognition task means that this problem cannot be specified even by a dataset as large as ImageNet, so our model should also have lots of prior knowledge to compensate for all the data we don’t have. Convolutional neural networks (CNNs) constitute one such class of models [16, 11, 13, 18, 15, 22, 26]. Their capacity can be controlled by varying their depth and breadth, and they also make strong and mostly correct assumptions about the nature of images (namely, station ari ty of statistics and locality of pixel dependencies). Thus, compared to standard feed forward neural networks with similarly-sized layers, CNNs have much fewer connections and parameters and so they are easier to train, while their theoretically-best performance is likely to be only slightly worse.

为了从数百万张图像中学习成千上万的物体,我们需要一个具备强大学习能力的模型。然而,物体识别任务的极端复杂性意味着即使像ImageNet这样庞大的数据集也无法完全定义这个问题,因此我们的模型还应具备大量先验知识来弥补未覆盖的数据。卷积神经网络(CNN)正是这样一类模型[16, 11, 13, 18, 15, 22, 26]。通过调整其深度和宽度可以控制其容量,同时它们对图像本质(即统计平稳性和像素依赖的局部性)作出了强有力且基本正确的假设。因此,与具有相似规模层的标准前馈神经网络相比,CNN的连接和参数数量要少得多,更易于训练,而其理论最佳性能可能仅略逊一筹。

Despite the attractive qualities of CNNs, and despite the relative efficiency of their local architecture, they have still been prohibitively expensive to apply in large scale to high-resolution images. Luckily, current GPUs, paired with a highly-optimized implementation of 2D convolution, are powerful enough to facilitate the training of interestingly-large CNNs, and recent datasets such as ImageNet contain enough labeled examples to train such models without severe over fitting.

尽管卷积神经网络 (CNN) 具有诱人的特性,且其局部架构相对高效,但将其大规模应用于高分辨率图像仍存在难以承受的计算成本。幸运的是,当前 GPU 配合高度优化的二维卷积实现,已具备足够能力训练具有实用价值的大规模 CNN,而 ImageNet 等现代数据集提供的海量标注样本也能有效避免这类模型出现严重过拟合。

The specific contributions of this paper are as follows: we trained one of the largest convolutional neural networks to date on the subsets of ImageNet used in the ILSVRC-2010 and ILSVRC-2012 competitions [2] and achieved by far the best results ever reported on these datasets. We wrote a highly-optimized GPU implementation of 2D convolution and all the other operations inherent in training convolutional neural networks, which we make available publicly1. Our network contains a number of new and unusual features which improve its performance and reduce its training time, which are detailed in Section 3. The size of our network made over fitting a significant problem, even with 1.2 million labeled training examples, so we used several effective techniques for preventing over fitting, which are described in Section 4. Our final network contains five convolutional and three fully-connected layers, and this depth seems to be important: we found that removing any convolutional layer (each of which contains no more than $1%$ of the model’s parameters) resulted in inferior performance.

本文的具体贡献如下:我们在ILSVRC-2010和ILSVRC-2012竞赛[2]使用的ImageNet子集上训练了迄今为止最大的卷积神经网络之一,并取得了这些数据集上迄今为止报告的最佳结果。我们编写了一个高度优化的2D卷积GPU实现以及训练卷积神经网络所需的所有其他操作,并公开了代码1。我们的网络包含多项新颖且不寻常的特性,这些特性提升了其性能并缩短了训练时间,详见第3节。即使有120万带标注的训练样本,网络规模仍导致过拟合成为显著问题,因此我们采用了多种有效技术来防止过拟合,详见第4节。最终网络包含五个卷积层和三个全连接层,这种深度至关重要:我们发现移除任何卷积层(每层参数不超过模型参数的$1%$)都会导致性能下降。

In the end, the network’s size is limited mainly by the amount of memory available on current GPUs and by the amount of training time that we are willing to tolerate. Our network takes between five and six days to train on two GTX 580 3GB GPUs. All of our experiments suggest that our results can be improved simply by waiting for faster GPUs and bigger datasets to become available.

最终,网络的规模主要受限于当前GPU的可用内存量以及我们能够容忍的训练时长。我们的网络在两块GTX 580 3GB GPU上需要5到6天完成训练。所有实验表明,只需等待更快的GPU和更大规模数据集的出现,我们的结果就能得到提升。

2 The Dataset

2 数据集

ImageNet is a dataset of over 15 million labeled high-resolution images belonging to roughly 22,000 categories. The images were collected from the web and labeled by human labelers using Amazon’s Mechanical Turk crowd-sourcing tool. Starting in 2010, as part of the Pascal Visual Object Challenge, an annual competition called the ImageNet Large-Scale Visual Recognition Challenge (ILSVRC) has been held. ILSVRC uses a subset of ImageNet with roughly 1000 images in each of 1000 categories. In all, there are roughly 1.2 million training images, 50,000 validation images, and 150,000 testing images.

ImageNet是一个包含超过1500万张标注高分辨率图像的数据集,涵盖约2.2万个类别。这些图像从网络收集,并通过Amazon的Mechanical Turk众包工具由人工标注员标注。自2010年起,作为Pascal Visual Object Challenge的一部分,每年都会举办名为ImageNet大规模视觉识别挑战赛(ILSVRC)的竞赛。ILSVRC使用ImageNet的子集,包含1000个类别,每个类别约1000张图像。总计约120万张训练图像、5万张验证图像和15万张测试图像。

ILSVRC-2010 is the only version of ILSVRC for which the test set labels are available, so this is the version on which we performed most of our experiments. Since we also entered our model in the ILSVRC-2012 competition, in Section 6 we report our results on this version of the dataset as well, for which test set labels are unavailable. On ImageNet, it is customary to report two error rates: top-1 and top-5, where the top-5 error rate is the fraction of test images for which the correct label is not among the five labels considered most probable by the model.

ILSVRC-2010是唯一提供测试集标签的ILSVRC版本,因此我们在此版本上进行了大部分实验。由于我们也参加了ILSVRC-2012竞赛,在第6节中我们同样报告了该数据集版本的结果(该版本测试集标签未公开)。在ImageNet上,通常报告两种错误率:top-1和top-5,其中top-5错误率指测试图像的正确标签不在模型预测概率最高的五个标签中的比例。

ImageNet consists of variable-resolution images, while our system requires a constant input dimensionality. Therefore, we down-sampled the images to a fixed resolution of $256\times256$ . Given a rectangular image, we first rescaled the image such that the shorter side was of length 256, and then cropped out the central $256\times256$ patch from the resulting image. We did not pre-process the images in any other way, except for subtracting the mean activity over the training set from each pixel. So we trained our network on the (centered) raw RGB values of the pixels.

ImageNet 包含不同分辨率的图像,而我们的系统需要恒定的输入维度。因此,我们将图像下采样至固定分辨率 $256\times256$。对于矩形图像,我们首先调整图像尺寸使短边长度为 256,然后从结果图像中裁剪出中心 $256\times256$ 区域。除从每个像素减去训练集上的平均活跃度外,我们未对图像进行任何其他预处理。因此,我们直接在像素的 (中心化) 原始 RGB 值上训练网络。

3 The Architecture

3 架构

The architecture of our network is summarized in Figure 2. It contains eight learned layers — five convolutional and three fully-connected. Below, we describe some of the novel or unusual features of our network’s architecture. Sections 3.1-3.4 are sorted according to our estimation of their importance, with the most important first.

我们的网络架构如图 2 所示。它包含八个学习层——五个卷积层和三个全连接层。下面我们将介绍该网络架构中一些新颖或不寻常的特性。章节 3.1-3.4 按照我们对其重要性的评估进行排序,最重要的排在最前面。

3.1 ReLU Non linearity

3.1 ReLU 非线性激活函数

The standard way to model a neuron’s output $f$ as a function of its input $x$ is with $f(x)=\operatorname{tanh}(x)$ or $f(x)=(1+{e^{-x}})^{-1}$ . In terms of training time with gradient descent, these saturating nonlinear i ties are much slower than the non-saturating non linearity $f(x)=\operatorname* {max}(0,x)$ . Following Nair and Hinton [20], we refer to neurons with this non linearity as Rectified Linear Units (ReLUs). Deep convolutional neural networks with ReLUs train several times faster than their equivalents with tanh units. This is demonstrated in Figure 1, which shows the number of iterations required to reach $25%$ training error on the CIFAR-10 dataset for a particular four-layer convolutional network. This plot shows that we would not have been able to experiment with such large neural networks for this work if we had used traditional saturating neuron models.

标准方法将神经元的输出 $f$ 建模为输入 $x$ 的函数,通常使用 $f(x)=\operatorname{tanh}(x)$ 或 $f(x)=(1+{e^{-x}})^{-1}$。在梯度下降训练时间方面,这些饱和非线性 (saturating nonlinearities) 比非饱和非线性 (non-saturating nonlinearity) $f(x)=\operatorname* {max}(0,x)$ 慢得多。遵循 Nair 和 Hinton [20] 的命名,我们将采用这种非线性的神经元称为修正线性单元 (Rectified Linear Units, ReLUs)。使用 ReLUs 的深度卷积神经网络训练速度比使用 tanh 单元的同类网络快数倍。图 1 展示了在 CIFAR-10 数据集上,某个特定四层卷积网络达到 $25%$ 训练错误率所需的迭代次数。该图表明,如果使用传统的饱和神经元模型,我们无法在本研究中实验如此大规模的神经网络。

We are not the first to consider alternatives to traditional neuron models in CNNs. For example, Jarrett et al. [11] claim that the non linearity $f(x)=\left|\operatorname{tanh}(x)\right|$ works particularly well with their type of contrast normalization followed by local average pooling on the Caltech-101 dataset. However, on this dataset the primary concern is preventing over fitting, so the effect they are observing is different from the accelerated ability to fit the training set which we report when using ReLUs. Faster learning has a great influence on the performance of large models trained on large datasets.

我们并非首个考虑在CNN中替代传统神经元模型的研究团队。例如,Jarrett等人[11]提出非线性函数$f(x)=\left|\operatorname{tanh}(x)\right|$在Caltech-101数据集上结合其对比度归一化与局部平均池化方法表现优异。但该数据集的核心问题是防止过拟合,因此他们观察到的效果与我们使用ReLU时报告的加速训练集拟合能力存在本质差异。学习速度的提升对大规模数据集训练的大型模型性能具有重大影响。


Figure 1: A four-layer convolutional neural network with ReLUs (solid line) reaches a $25%$ training error rate on CIFAR-10 six times faster than an equivalent network with tanh neurons (dashed line). The learning rates for each network were chosen independently to make training as fast as possible. No regular iz ation of any kind was employed. The magnitude of the effect demonstrated here varies with network architecture, but networks with ReLUs consistently learn several times faster than equivalents with saturating neurons.

图 1: 使用ReLU激活函数(实线)的四层卷积神经网络在CIFAR-10数据集上达到25%训练错误率的速度,比使用tanh神经元(虚线)的同等网络快六倍。每个网络的学习率均经过独立选择以实现最快训练速度。未采用任何形式的正则化。该效果的显著程度会随网络架构变化,但采用ReLU的网络始终比使用饱和神经元的同等网络快数倍。

3.2 Training on Multiple GPUs

3.2 多GPU训练

A single GTX 580 GPU has only 3GB of memory, which limits the maximum size of the networks that can be trained on it. It turns out that 1.2 million training examples are enough to train networks which are too big to fit on one GPU. Therefore we spread the net across two GPUs. Current GPUs are particularly well-suited to cross-GPU parallel iz ation, as they are able to read from and write to one another’s memory directly, without going through host machine memory. The parallel iz ation scheme that we employ essentially puts half of the kernels (or neurons) on each GPU, with one additional trick: the GPUs communicate only in certain layers. This means that, for example, the kernels of layer 3 take input from all kernel maps in layer 2. However, kernels in layer 4 take input only from those kernel maps in layer 3 which reside on the same GPU. Choosing the pattern of connectivity is a problem for cross-validation, but this allows us to precisely tune the amount of communication until it is an acceptable fraction of the amount of computation.

一块GTX 580 GPU仅有3GB内存,这限制了可训练网络的最大规模。事实证明,120万训练样本足以训练出无法单卡容纳的大型网络。为此我们将网络拆分到两块GPU上运行。现代GPU特别适合跨卡并行计算,因为它们能直接读写彼此显存,无需经过主机内存。我们采用的并行化方案本质上是将半数卷积核(或神经元)分配到每块GPU,并附加一个技巧:GPU仅在特定层间通信。例如,第3层卷积核会接收第2层所有特征图的输入,而第4层卷积核仅接收同卡第3层特征图的输入。连接模式的选择需通过交叉验证确定,但这种方法能让我们精确调控通信量,直至其与计算量之比达到可接受范围。

The resultant architecture is somewhat similar to that of the “columnar'’ CNN employed by Ciresan et al. [5], except that our columns are not independent (see Figure 2). This scheme reduces our top-1 and top-5 error rates by $1.7%$ and $1.2%$ , respectively, as compared with a net with half as many kernels in each convolutional layer trained on one GPU. The two-GPU net takes slightly less time to train than the one-GPU net2.

最终得到的架构与 Ciresan 等人 [5] 采用的"柱状" CNN 有些相似,只是我们的各列并不独立 (见图 2)。与在单个 GPU 上训练、每个卷积层核数减半的网络相比,该方案使我们的 top-1 和 top-5 错误率分别降低了 $1.7%$ 和 $1.2%$。双 GPU 网络的训练时间略短于单 GPU 网络。

3.3 Local Response Normalization

3.3 局部响应归一化 (Local Response Normalization)

ReLUs have the desirable property that they do not require input normalization to prevent them from saturating. If at least some training examples produce a positive input to a ReLU, learning will happen in that neuron. However, we still find that the following local normalization scheme aids generalization. Denoting by $a_ {x,y}^{i}$ the activity of a neuron computed by applying kernel $i$ at position $(x,y)$ and then applying the ReLU non linearity, the response-normalized activity $b_ {x,y}^{i}$ is given by the expression

ReLU具有一个理想特性:它们不需要通过输入归一化来防止饱和。如果至少有一些训练样本对ReLU产生了正输入,该神经元就会进行学习。然而,我们发现以下局部归一化方案仍有助于提升泛化能力。用$a_ {x,y}^{i}$表示在位置$(x,y)$应用核$i$并通过ReLU非线性计算得到的神经元活性,响应归一化后的活性$b_ {x,y}^{i}$由以下表达式给出:

$$
b_ {x,y}^{i}=a_ {x,y}^{i}/\left(k+\alpha\sum_ {j=\operatorname* {max}(0,i-n/2)}^{\operatorname* {min}(N-1,i+n/2)}(a_ {x,y}^{j})^{2}\right)^{\beta}
$$

$$
b_ {x,y}^{i}=a_ {x,y}^{i}/\left(k+\alpha\sum_ {j=\operatorname* {max}(0,i-n/2)}^{\operatorname* {min}(N-1,i+n/2)}(a_ {x,y}^{j})^{2}\right)^{\beta}
$$

where the sum runs over $n$ “adjacent” kernel maps at the same spatial position, and $N$ is the total number of kernels in the layer. The ordering of the kernel maps is of course arbitrary and determined before training begins. This sort of response normalization implements a form of lateral inhibition inspired by the type found in real neurons, creating competition for big activities amongst neuron outputs computed using different kernels. The constants $k,n,\alpha$ , and $\beta$ are hyper-parameters whose values are determined using a validation set; we used $k=2$ , $n=5$ , $\alpha=10^{-4}$ , and $\beta=0.75$ . We applied this normalization after applying the ReLU non linearity in certain layers (see Section 3.5).

其中求和运算对同一空间位置上 $n$ 个“相邻”核映射进行,$N$ 是该层的核总数。核映射的顺序当然是任意的,并在训练开始前确定。这种响应归一化实现了受真实神经元类型启发的侧向抑制形式,为使用不同核计算出的神经元输出之间的大活动创造了竞争。常数 $k,n,\alpha$ 和 $\beta$ 是超参数,其值通过验证集确定;我们使用 $k=2$、$n=5$、$\alpha=10^{-4}$ 和 $\beta=0.75$。我们在某些层应用ReLU非线性后应用了这种归一化(见第3.5节)。

This scheme bears some resemblance to the local contrast normalization scheme of Jarrett et al. [11], but ours would be more correctly termed “brightness normalization”, since we do not subtract the mean activity. Response normalization reduces our top-1 and top-5 error rates by $1.4%$ and $1.2%$ , respectively. We also verified the effectiveness of this scheme on the CIFAR-10 dataset: a four-layer CNN achieved a $13%$ test error rate without normalization and $11%$ with normalization 3.

该方案与Jarrett等人[11]提出的局部对比度归一化方案有些相似,但我们的方法更应称为"亮度归一化",因为我们并未减去平均激活值。响应归一化使我们的top-1和top-5错误率分别降低了$1.4%$和$1.2%$。我们还在CIFAR-10数据集上验证了该方案的有效性:未使用归一化的四层CNN测试错误率为$13%$,而采用归一化3后降至$11%$。

3.4 Overlapping Pooling

3.4 重叠池化

Pooling layers in CNNs summarize the outputs of neighboring groups of neurons in the same kernel map. Traditionally, the neighborhoods summarized by adjacent pooling units do not overlap (e.g., [17, 11, 4]). To be more precise, a pooling layer can be thought of as consisting of a grid of pooling units spaced $s$ pixels apart, each summarizing a neighborhood of size $z\times z$ centered at the location of the pooling unit. If we set $s=z$ , we obtain traditional local pooling as commonly employed in CNNs. If we set $s<z$ , we obtain overlapping pooling. This is what we use throughout our network, with $s=2$ and $z=3$ . This scheme reduces the top-1 and top-5 error rates by $0.4%$ and $0.3%$ , respectively, as compared with the non-overlapping scheme $s=2,z=2$ , which produces output of equivalent dimensions. We generally observe during training that models with overlapping pooling find it slightly more difficult to overfit.

CNN中的池化层会对同一核映射中相邻神经元的输出进行汇总。传统上,相邻池化单元汇总的区域互不重叠(例如[17, 11, 4])。具体而言,池化层可视为由间距为$s$像素的池化单元网格组成,每个单元汇总以该位置为中心、大小为$z×z$的区域。当设定$s=z$时,即得到CNN常用的传统局部池化;当$s<z$时则形成重叠池化。本网络全程采用$s=2$和$z=3$的重叠池化方案,与输出维度相同但$s=2,z=2$的非重叠方案相比,该方案使top-1和top-5错误率分别降低$0.4%$和$0.3%$。训练中我们观察到,采用重叠池化的模型较难出现过拟合现象。

3.5 Overall Architecture

3.5 整体架构

Now we are ready to describe the overall architecture of our CNN. As depicted in Figure 2, the net contains eight layers with weights; the first five are convolutional and the remaining three are fullyconnected. The output of the last fully-connected layer is fed to a 1000-way softmax which produces a distribution over the 1000 class labels. Our network maximizes the multi no mi al logistic regression objective, which is equivalent to maximizing the average across training cases of the log-probability of the correct label under the prediction distribution.

现在我们可以描述CNN的整体架构了。如图2所示,该网络包含八个带权重的层:前五层是卷积层,后三层是全连接层。最后一个全连接层的输出被送入一个1000路的softmax分类器,生成1000个类别标签的概率分布。我们的网络通过最大化多项逻辑回归目标函数进行优化,这相当于最大化训练样本在预测分布下正确标签对数概率的平均值。

The kernels of the second, fourth, and fifth convolutional layers are connected only to those kernel maps in the previous layer which reside on the same GPU (see Figure 2). The kernels of the third convolutional layer are connected to all kernel maps in the second layer. The neurons in the fullyconnected layers are connected to all neurons in the previous layer. Response-normalization layers follow the first and second convolutional layers. Max-pooling layers, of the kind described in Section 3.4, follow both response-normalization layers as well as the fifth convolutional layer. The ReLU non-linearity is applied to the output of every convolutional and fully-connected layer.

第二、第四和第五卷积层的核仅连接到前一层中位于同一GPU上的核映射(见图2)。第三卷积层的核则连接到第二层的所有核映射。全连接层中的神经元与前一层的所有神经元相连。响应归一化层紧随第一和第二卷积层之后。如3.4节所述的最大池化层,既跟在响应归一化层之后,也跟在第五卷积层之后。ReLU非线性被应用于每个卷积层和全连接层的输出。

The first convolutional layer filters the $224\times224\times3$ input image with 96 kernels of size $11\times11\times3$ with a stride of 4 pixels (this is the distance between the receptive field centers of neighboring neurons in a kernel map). The second convolutional layer takes as input the (response-normalized and pooled) output of the first convolutional layer and filters it with 256 kernels of size $5\times5\times48$ . The third, fourth, and fifth convolutional layers are connected to one another without any intervening pooling or normalization layers. The third convolutional layer has 384 kernels of size $3\times3\times$ 256 connected to the (normalized, pooled) outputs of the second convolutional layer. The fourth convolutional layer has 384 kernels of size $3\times3\times192$ , and the fifth convolutional layer has 256 kernels of size $3\times3\times192$ . The fully-connected layers have 4096 neurons each.

第一卷积层用96个尺寸为$11\times11\times3$的核(步长4像素)对$224\times224\times3$输入图像进行滤波(步长指核映射中相邻神经元感受野中心间距)。第二卷积层以第一卷积层的(响应归一化及池化后)输出作为输入,用256个$5\times5\times48$尺寸的核进行滤波。第三、四、五卷积层直接级联,中间未插入池化或归一化层。第三卷积层包含384个$3\times3\times256$尺寸的核,连接至第二卷积层(归一化及池化后)的输出。第四卷积层含384个$3\times3\times192$尺寸的核,第五卷积层含256个$3\times3\times192$尺寸的核。全连接层各包含4096个神经元。


Figure 2: An illustration of the architecture of our CNN, explicitly showing the delineation of responsibilities between the two GPUs. One GPU runs the layer-parts at the top of the figure while the other runs the layer-parts at the bottom. The GPUs communicate only at certain layers. The network’s input is 150,528-dimensional, and the number of neurons in the network’s remaining layers is given by 253,440–186,624–64,896–64,896–43,264– 4096–4096–1000.

图 2: 我们的CNN架构示意图,明确展示了两块GPU之间的职责划分。一块GPU运行图中顶部的层部分,另一块运行底部的层部分。GPU仅在特定层进行通信。网络输入维度为150,528,其余各层神经元数量依次为253,440–186,624–64,896–64,896–43,264–4096–4096–1000。

4 Reducing Over fitting

4 减少过拟合

Our neural network architecture has 60 million parameters. Although the 1000 classes of ILSVRC make each training example impose 10 bits of constraint on the mapping from image to label, this turns out to be insufficient to learn so many parameters without considerable over fitting. Below, we describe the two primary ways in which we combat over fitting.

我们的神经网络架构拥有6000万个参数。尽管ILSVRC的1000个类别使得每个训练样本对从图像到标签的映射施加了10比特的约束,但事实证明这不足以在避免严重过拟合的情况下学习如此多的参数。下面,我们将介绍两种主要的对抗过拟合的方法。

4.1 Data Augmentation

4.1 数据增强

The easiest and most common method to reduce over fitting on image data is to artificially enlarge the dataset using label-preserving transformations (e.g., [25, 4, 5]). We employ two distinct forms of data augmentation, both of which allow transformed images to be produced from the original images with very little computation, so the transformed images do not need to be stored on disk. In our implementation, the transformed images are generated in Python code on the CPU while the GPU is training on the previous batch of images. So these data augmentation schemes are, in effect, computationally free.

降低图像数据过拟合最简单且常用的方法是使用保留标签的变换(如[25, 4, 5])人为扩展数据集。我们采用两种不同的数据增强形式,二者都能以极低计算量从原图像生成变换后的图像,因此无需将变换后的图像存储在磁盘上。在我们的实现中,变换图像由CPU端的Python语言代码实时生成,而GPU正处理前一批图像的训练。因此,这些数据增强方案实际上不产生额外计算开销。

The first form of data augmentation consists of generating image translations and horizontal reflections. We do this by extracting random $224\times224$ patches (and their horizontal reflections) from the $256\times256$ images and training our network on these extracted patches4. This increases the size of our training set by a factor of 2048, though the resulting training examples are, of course, highly interdependent. Without this scheme, our network suffers from substantial over fitting, which would have forced us to use much smaller networks. At test time, the network makes a prediction by extracting five $224\times224$ patches (the four corner patches and the center patch) as well as their horizontal reflections (hence ten patches in all), and averaging the predictions made by the network’s softmax layer on the ten patches.

第一种数据增强形式包括生成图像平移和水平翻转。我们通过从$256\times256$图像中随机提取$224\times224$的块(及其水平翻转),并在这些提取的块上训练网络来实现这一点4。这使我们的训练集规模扩大了2048倍,尽管生成的训练样本之间高度相关。若不采用此方案,网络会出现严重的过拟合,迫使我们使用更小的网络。测试时,网络通过提取五个$224\times224$块(四个角块和中心块)及其水平翻转(共十个块),并对网络softmax层在这十个块上的预测结果取平均来做出最终预测。

The second form of data augmentation consists of altering the intensities of the RGB channels in training images. Specifically, we perform PCA on the set of RGB pixel values throughout the ImageNet training set. To each training image, we add multiples of the found principal components, with magnitudes proportional to the corresponding eigenvalues times a random variable drawn from a Gaussian with mean zero and standard deviation 0.1. Therefore to each