[来源关键摘录] 详述 AlexNet 在两块 NVIDIA GTX 580 3GB GPU 上训练 5 至 6 天并于 2012 年 9 月 30 日大幅刷新 ImageNet 纪录的历史。
[正文前段节选] Jump to content
16 languages
Српски / srpski
From Wikipedia, the free encyclopedia
Influential 2012 deep convolutional neural network
DevelopersAlex Krizhevsky, Ilya Sutskever, and Geoffrey Hinton
ReleaseSeptember 30, 2012; 14 years ago (2012-09-30)
Written inCUDA, C++
TypeConvolutional neural network
LicenseNew BSD License
Repositorycode.google.com/archive/p/cuda-convnet/
AlexNet architecture and a possible modification. At the top is half of the original AlexNet, which is divided into two halves, one for each GPU. At the bottom is the same architecture, but the final "projection" layer is replaced by another that projects to fewer outputs. If one freezes the remaining model and only fine-tunes the last layer, one can obtain another vision model at a significantly lower cost than training one from scratch.
LeNet (left) and AlexNet (right) block diagram
AlexNet is a convolutional neural network architecture developed for image classification tasks, notably achieving prominence through its performance in the ImageNet Large Scale Visual Recognition Challenge (ILSVRC). It classifies images into 1,000 distinct object categories and is regarded as the first widely recognized application of deep convolutional networks in large-scale visual recognition.
Developed in 2012 by Alex Krizhevsky in collaboration with Ilya Sutskever and his Ph.D. advisor Geoffrey Hinton at the University of Toronto, the model contains 60 million parameters and 650,000 neurons.[1] The original paper's primary result was that the depth of the model was essential for its high performance, which was computationally expensive, but made feasible due to the utilization of graphics processing units (GPUs) during training.[1]
The three formed team SuperVision and submitted AlexNet in the ImageNet Large Scale Visual Recognition Challenge on September 30, 2012.[2] The network achieved a top-5 error rate of 15.3% to win the contest, more than 10.8% points better than the runner-up.
The architecture influenced a large number of subsequent work in deep learning, especially in applying neural networks to computer vision.
Architecture
AlexNet contains eight layers: the first five are convolutional layers, some of them followed by max-pooling layers, and the last three are fully connected layers. The network, except the last layer, is split into two copies, each run on one GPU, because the network did not fit the VRAM of a single Nvidia GTX 580 3GB GPU.[1]: Section 3.2 The entire structure can be written as
(CONV → RN → MP)2 → (CONV3 → MP) → (FC → DO)2 → Linear → softmax
CONV = convolutional layer (with ReLU activation)
RN = local response normalization
MP = max-pooling
FC = fully connected layer (with ReLU activation)
Linear = fully connected layer (without activation)
DO = dropout
Notably, the convolutional layers 3, 4, 5 were connected to one another without any pooling or normalization. It used the non-saturating ReLU activation function, which trained better than tanh and sigmoid.[1]
The ImageNet training set contained 1.2 million images. The model was trained for 90 epochs over a period of five to six days using two Nvidia GTX 580 GPUs (3GB each).[1] These GPUs have a theoretical performance of 1.581 TFLOPS in float32 and were priced at US$500 upon release.[3] Each forward pass of AlexNet required approximately 1.43 GFLOPs.[4] Based on these values, the two GPUs together were theoretically capable of performing over 2,200 forward passes per second under ideal conditions.
The dataset images were stored in JPEG format and took up 27GB of disk. The neural network took up 2GB of RAM on each GPU and around 5GB of system RAM during training. The GPUs were responsible for training, while the CPUs were responsible both for loading images from disk and for data-augmenting the images.[5]
AlexNet was trained with momentum gradient descent with a batch size of 128 examples, momentum of 0.9, and weight decay of 0.0005. Learning rate started at 10−2 and was manually decreased 10-fold whenever validation error appeared to stop decreasing. It was reduced three times during training, ending at 10−5.
It used two forms of data augmentation, both computed on the fly on the CPU, thus "computationally free":
Each image from ImageNet was first scaled, so that its shorter side was of length 256. Then the central 256×256 patch was cropped out and normalized (dividing the pixel values so that they fall between 0 and 1, then subtracting by [0.485, 0.456, 0.406], then dividing by [0.229, 0.224, 0.225]. These are the mean and standard deviations for ImageNet, so this whitens the input data).
Extracting random 224×224 patches (and their horizontal reflections) from the 256×256 crop. This increases the size of the training set 2048-fold.
Randomly shifting the RGB value of each image along the three principal directions of the RGB values of its pixels.
The resolution 224×224 was picked, because 256 - 16 - 16 = 224, meaning that given a 256×256 image, framing out a width of 16 on its 4 sides results in a 224×224 image.
It used local response normalization, and dropout regularization with drop probability 0.5.
All weights were initialized as gaussians with 0 mean and 0.01 standard deviation. Biases in convolutional layers 2, 4, 5, and all fully-connected layers, were initialized to constant 1 to avoid the dying ReLU problem.
At test time, to use a trained AlexNet for predicting the class of an image, that image is first scaled, so that its shorter side was of length 256. Then the central 256×256 patch was cropped out. Then, the five 224 × 224 patches (the four corner patches and the center patch) as well as their horizontal reflections are computed, 10 patches in all. The network's predicted probabilities on all 10 patches are averaged, and that is the final predicted probability.
ImageNet competition
The version they used to enter the 2012 ImageNet competition was an ensemble of 7 AlexNets.
Specifically, they trained 5 AlexNets of the previously described architecture (with 5 CONV layers) on the ILSVRC-2012 training set (1.2 million images). They also trained 2 variant AlexNets, obtained by adding one extra CONV layer over the last pooling layer. These were trained by first training on the entire ImageNet Fall 2011 release (15 million images in 22K categories), and then finetuning it on the ILSVRC-2012 training set. The final system of 7 AlexNets was used by averaging their predicted probabilities.
Previous work
Comparison of the LeNet and AlexNet convolution, pooling, and dense layers(AlexNet image size should be 227×227×3, instead of 224×224×3, so the math will come out right. The original paper said different numbers, but Andrej Karpathy, the former head of computer vision at Tesla, said it should be 227×227×3 (he said Alex didn't describe why he put 224×224×3). The next convolution should be 11×11 with stride 4: 55×55×96 (instead of 54×54×96). It would be calculated, for example, as: [(input width 227 - kernel width 11) / stride 4] + 1 = [(227 - 11) / 4] + 1 = 55. Since the kernel output is the same length as width, its area is 55×55.)
In 1980, Kunihiko Fukushima proposed an early CNN named neocognitron.[6][7] It was trained by an unsupervised learning algorithm. The LeNet-5 (Yann LeCun et al., 1989)[8][9] was trained by supervised learning with backpropagation algorithm, with an architecture that is essentially the same as AlexNet on a small scale.
Max pooling was used in 1990 for speech processing (essentially a 1-dimensional CNN).[10]
[...内容已截断,完整版请查看原文或 Wayback 快照]