Sunday, April 11, 2021

NIN(一):Paper Translation

 NIN(一):Paper Translation

2021/03/07

Network In Network

網路中的網路

-----


https://pixabay.com/zh/photos/drops-raindrops-synapse-network-1101259/

-----

Abstract

摘要

-----

We propose a novel deep network structure called “Network In Network”(NIN) to enhance model discriminability for local patches within the receptive field. The conventional convolutional layer uses linear filters followed by a nonlinear activation function to scan the input. Instead, we build micro neural networks with more complex structures to abstract the data within the receptive field. We instantiate the micro neural network with a multilayer perceptron, which is a potent function approximator. 

The feature maps are obtained by sliding the micro networks over the input in a similar manner as CNN; they are then fed into the next layer. Deep NIN can be implemented by stacking mutiple of the above described structure. With enhanced local modeling via the micro network, we are able to utilize global average pooling over feature maps in the classification layer, which is easier to interpret and less prone to overfitting than traditional fully connected layers. We demonstrated the state-of-the-art classification performances with NIN on CIFAR-10 and CIFAR-100, and reasonable performances on SVHN and MNIST datasets.

我們提出了一種新穎的深層網路結構,稱為“網路中的網路”(NIN),以增強模型對可接收區域內局部色塊的判別能力。 傳統的卷積層使用線性濾波器,然後使用非線性激活函數來掃描輸入。 取而代之的是,我們構建具有更複雜結構的微神經網路,以萃取接受域中的資料。 我們使用多層感知器實做微神經網路,該感知器是一種有效的函數逼近器。

通過以類似於 CNN 的方式在輸入上滑動微網路來獲得特徵圖。 然後將它們送入下一層。 深度 NIN 可以通過堆疊上述結構的多個實現。 通過微網路增強的局部建模,我們能夠在分類層的特徵圖上利用全局平均池化,與傳統的全連接層相比,它更易於解釋且不太容易過擬合。 我們展示了 NIN 在 CIFAR-10 和 CIFAR-100 上的卓越性能,以及在 SVHN 和 MNIST 數據集上的合理性能。

-----

1 Introduction

1 引言

Convolutional neural networks (CNNs) [1] consist of alternating convolutional layers and pooling layers. Convolution layers take inner product of the linear filter and the underlying receptive field followed by a nonlinear activation function at every local portion of the input. The resulting outputs are called feature maps.

卷積神經網路(CNN)[1] 由交替的卷積層和池化層組成。 卷積層取線性濾波器和下面的接收場的內積,然後在輸入的每個局部部分加上非線性激活函數。 結果輸出稱為特徵圖。

The convolution filter in CNN is a generalized linear model (GLM) for the underlying data patch, and we argue that the level of abstraction is low with GLM. By abstraction we mean that the feature is invariant to the variants of the same concept [2]. Replacing the GLM with a more potent nonlinear function approximator can enhance the abstraction ability of the local model. GLM can achieve a good extent of abstraction when the samples of the latent concepts are linearly separable, i.e. the variants of the concepts all live on one side of the separation plane defined by the GLM. 

本段不翻譯。

Thus conventional CNN implicitly makes the assumption that the latent concepts are linearly separable. However, the data for the same concept often live on a nonlinear manifold, therefore the representations that capture these concepts are generally highly nonlinear function of the input. In NIN, the GLM is replaced with a ”micro network” structure which is a general nonlinear function approximator. In this work, we choose multilayer perceptron [3] as the instantiation of the micro network, which is a universal function approximator and a neural network trainable by back-propagation.

因此,傳統的 CNN 隱含地假設了潛在概念是線性可分離的。 但是,同一概念的數據通常存在於非線性流形上,因此,捕獲這些概念的表示形式通常是輸入的高度非線性函數。 在 NIN 中,將 GLM 替換為“微網路”結構,該結構是通用的非線性函數逼近器。 在這項工作中,我們選擇多層感知器[ 3] 作為微網路的具體化,這是一個通用函數逼近器和可通過反向傳播訓練的神經網路。

The resulting structure which we call an mlpconv layer is compared with CNN in Figure 1. Both the linear convolutional layer and the mlpconv layer map the local receptive field to an output feature vector. The mlpconv maps the input local patch to the output feature vector with a multilayer perceptron (MLP) consisting of multiple fully connected layers with nonlinear activation functions. The MLP is shared among all local receptive fields. The feature maps are obtained by sliding the MLP over the input in a similar manner as CNN and are then fed into the next layer. The overall structure of the NIN is the stacking of multiple mlpconv layers. It is called “Network In Network” (NIN) as we have micro networks (MLP), which are composing elements of the overall deep network, within mlpconv layers,

在圖1 中將我們稱為 mlpconv 層的結果結構與 CNN 進行了比較。線性卷積層和 mlpconv 層均將局部接收場映射到輸出特徵向量。 mlpconv 使用多層感知器(MLP)將輸入局部補丁映射到輸出特徵向量,該感知器由具有非線性激活功能的多個全連接層組成。 MLP 在所有局部接收域之間共享。 通過以類似於 CNN 的方式在輸入上滑動 MLP 來獲得特徵圖,然後將其饋送到下一層。 NIN 的整體結構是多個 mlpconv 層的堆疊。 它被稱為“網路中的網路”(NIN),因為我們在 mlpconv 層中擁有構成整個深層網路元素的微網路(MLP),

Instead of adopting the traditional fully connected layers for classification in CNN, we directly output the spatial average of the feature maps from the last mlpconv layer as the confidence of categories via a global average pooling layer, and then the resulting vector is fed into the softmax layer. In traditional CNN, it is difficult to interpret how the category level information from the objective cost layer is passed back to the previous convolution layer due to the fully connected layers which act as a black box in between. In contrast, global average pooling is more meaningful and interpretable as it enforces correspondance between feature maps and categories, which is made possible by a stronger local modeling using the micro network. Furthermore, the fully connected layers are prone to overfitting and heavily depend on dropout regularization [4] [5], while global average pooling is itself a structural regularizer, which natively prevents overfitting for the overall structure.

代替在 CNN 中採用傳統的全連接層進行分類,我們通過全局平均池化層直接從最後一個 mlpconv 層輸出特徵圖的空間平均值作為類別的置信度,然後將所得向量饋入 softmax 層。 在傳統的 CNN 中,由於全連接層之間充當了黑匣子,因此很難解釋來自輸出層的類別級別信息如何傳遞回先前的卷積層。 相比之下,全局平均池化在實現特徵圖和類別之間的對應關係時更具意義和可解釋性,這可以通過使用微網路進行更強大的局部建模來實現。 此外,全連接層易於過度擬合,並嚴重依賴於 dropout 正則化[4] [5],而全局平均池化本身就是結構性正則化器,可以自然地防止整體結構的過度擬合。

-----

2 Convolutional Neural Networks

2 卷積神經網路

-----

Classic convolutional neuron networks [1] consist of alternatively stacked convolutional layers and spatial pooling layers. The convolutional layers generate feature maps by linear convolutional filters followed by nonlinear activation functions (rectifier, sigmoid, tanh, etc.). Using the linear rectifier as an example, the feature map can be calculated as follows:

經典的捲積神經元網路 [1] 由交替堆疊的卷積層和空間池化層組成。 卷積層由線性卷積濾波器生成特徵圖,然後是非線性激活函數(整流器,sigmoid,tanh 等)。 以線性整流器為例,可以如下計算特徵圖:

Here (i; j) is the pixel index in the feature map, xij stands for the input patch centered at location (i; j), and k is used to index the channels of the feature map.

這裡(i; j)是特徵圖中的像素索引,xij 代表以位置(i; j)為中心的輸入色塊,而 k 用於索引特徵圖的通道。

This linear convolution is sufficient for abstraction when the instances of the latent concepts are linearly separable. However, representations that achieve good abstraction are generally highly nonlinear functions of the input data. In conventional CNN, this might be compensated by utilizing an over-complete set of filters [6] to cover all variations of the latent concepts. Namely, individual linear filters can be learned to detect different variations of a same concept. However, having too many filters for a single concept imposes extra burden on the next layer, which needs to consider all combinations of variations from the previous layer [7]. As in CNN, filters from higher layers map to larger regions in the original input. It generates a higher level concept by combining the lower level concepts from the layer below. Therefore, we argue that it would be beneficial to do a better abstraction on each local patch, before combining them into higher level concepts.

當潛在概念的實例是線性可分離的時,此線性卷積足以進行萃取。 但是,獲得良好萃取的表示形式通常是輸入資料的高度非線性函數。 在常規的 CNN 中,可以通過使用一組過於完整的過濾器[ 6] 來覆蓋潛在概念的所有變體來對此進行補償。 即,可以學習各個線性濾波器以檢測相同概念的不同變化。然而,對於單個概念而言,擁有太多過濾器會給下一層帶來額外的負擔,這需要考慮上一層的所有變體組合 [7]。 與 CNN 一樣,較高層的過濾器會映射到原始輸入中的較大區域。 它通過組合來自下一層的較低級別的概念來生成較高級別的概念。 因此,我們認為在將每個局部色塊組合成更高級別的概念之前,對其進行更好的萃取將是有益的。

In the recent maxout network [8], the number of feature maps is reduced by maximum pooling over affine feature maps (affine feature maps are the direct results from linear convolution without applying the activation function). Maximization over linear functions makes a piecewise linear approximator which is capable of approximating any convex functions. Compared to conventional convolutional layers which perform linear separation, the maxout network is more potent as it can separate concepts that lie within convex sets. This improvement endows the maxout network with the best performances on several benchmark datasets.

在最近的 maxout 網路 [8]中,通過對仿射特徵圖進行最大池化來減少特徵圖的數量(仿射特徵圖是線性卷積的直接結果,而未應用激活函數)。 線性函數的最大化使得分段線性逼近器能夠逼近任何凸函數。 與執行線性分離的常規卷積層相比,maxout 網路更有效,因為它可以分離出凸集內的概念。 這項改進使 maxout 網路在多個基準數據集上具有最佳性能。

However, maxout network imposes the prior that instances of a latent concept lie within a convex set in the input space, which does not necessarily hold. It would be necessary to employ a more general function approximator when the distributions of the latent concepts are more complex. We seek to achieve this by introducing the novel “Network In Network” structure, in which a micro network is introduced within each convolutional layer to compute more abstract features for local patches.

但是,maxout 網路強加了先驗,即潛在概念的實例位於輸入空間中的凸集內,該凸集不一定成立。 當潛在概念的分佈更複雜時,有必要採用更通用的函數逼近器。 我們試圖通過引入新穎的“網路內網路”結構來實現這一目標,其中在每個卷積層內引入一個微網路,以計算局部色塊的更多抽象特徵。

Sliding a micro network over the input has been proposed in several previous works. For example, the Structured Multilayer Perceptron (SMLP) [9] applies a shared multilayer perceptron on different patches of the input image; in another work, a neural network based filter is trained for face detection [10]. However, they are both designed for specific problems and both contain only one layer of the sliding network structure. NIN is proposed from a more general perspective, the micro network is integrated into CNN structure in persuit of better abstractions for all levels of features.

在先前的一些工作中已經提出了在輸入上滑動微網路。 例如,結構化多層感知器(SMLP)[9] 將共享的多層感知器應用於輸入圖像的不同色塊; 在另一項工作中,訓練了基於神經網路的過濾器進行面部檢測[10]。 但是,它們都針對特定問題而設計,並且都只包含滑動網路結構的一層。 NIN 是從更一般的角度提出的,為了更好地萃取所有級別的功能,微網路已整合到 CNN 結構中。

-----

3 Network In Network

3 網路中的網路

We first highlight the key components of our proposed “Network In Network” structure: the MLP convolutional layer and the global averaging pooling layer in Sec. 3.1 and Sec. 3.2 respectively. Then we detail the overall NIN in Sec. 3.3.

我們先在 3.1 節和 3.2 節中重點介紹我們提出的“網路中的網路”結構的關鍵組成部分:MLP 卷積層和全局平均池化層。 然後再於 3.3 節中詳細介紹整個 NIN。

3.1 MLP Convolution Layers

3.1 MLP卷積層

Given no priors about the distributions of the latent concepts, it is desirable to use a universal function approximator for feature extraction of the local patches, as it is capable of approximating more abstract representations of the latent concepts. Radial basis network and multilayer perceptron are two well known universal function approximators. We choose multilayer perceptron in this work for two reasons. First, multilayer perceptron is compatible with the structure of convolutional neural networks, which is trained using back-propagation. Second, multilayer perceptron can be a deep model itself, which is consistent with the spirit of feature re-use [2]. This new type of layer is called mlpconv in this paper, in which MLP replaces the GLM to convolve over the input. Figure 1 illustrates the difference between linear convolutional layer and mlpconv layer. The calculation performed by mlpconv layer is shown as follows:

在沒有關於潛在概念的分佈的先驗條件的情況下,期望使用通用函數逼近器來對局部色塊進行特徵提取,因為它能夠逼近潛在概念的更多抽象表示。 徑向基網路和多層感知器是兩個眾所周知的通用函數逼近器。 我們在這項工作中選擇多層感知器有兩個原因。 首先,多層感知器與使用反向傳播訓練的卷積神經網路的結構相容。其次,多層感知器本身可以是一個深層模型,這與特徵重用的精神是一致的 [2]。 在本文中,這種新類型的層稱為 mlpconv,其中 MLP 代替了 GLM 以在輸入上進行卷積。 圖1 說明了線性卷積層和 mlpconv 層之間的區別。 mlpconv層 執行的計算如下所示:

Here n is the number of layers in the multilayer perceptron. Rectified linear unit is used as the activation function in the multilayer perceptron.

在此,n 是多層感知器中的層數。 整流線性單元用作多層感知器中的激活函數。

From cross channel (cross feature map) pooling point of view, Equation 2 is equivalent to cascaded cross channel parametric pooling on a normal convolution layer. Each pooling layer performs weighted linear recombination on the input feature maps, which then go through a rectifier linear unit. The cross channel pooled feature maps are cross channel pooled again and again in the next layers. This cascaded cross channel parameteric pooling structure allows complex and learnable interactions of cross channel information.

從跨通道(跨特徵圖)池化的角度看,公式2 等效於正常卷積層上的級聯跨通道參數池化。 每個池化層在輸入特徵圖上執行加權線性重組,然後通過整流器線性單元。跨通道池化後的特徵圖會在下一層中一次又一次地進行跨通道池化。這種級聯的跨通道參數池化結構可讓跨通道資訊學習複雜的交互作用。

The cross channel parametric pooling layer is also equivalent to a convolution layer with 1x1 convolution kernel. This interpretation makes it straightforawrd to understand the structure of NIN.

跨通道參數池化層也等效於具有 1x1 卷積內核的卷積層。 這種解釋使得理解 NIN 的結構更直截了當。

Comparison to maxout layers: the maxout layers in the maxout network performs max pooling across multiple affine feature maps [8]. The feature maps of maxout layers are calculated as follows:

與 maxout 層的比較:maxout 網路中的 maxout 層跨多個仿射特徵圖執行最大池化 [8]。 maxout 圖層的特徵圖的計算方式如下:

Maxout over linear functions forms a piecewise linear function which is capable of modeling any convex function. For a convex function, samples with function values below a specific threshold form a convex set. Therefore, by approximating convex functions of the local patch, maxout has the capability of forming separation hyperplanes for concepts whose samples are within a convex set (i.e. l2 balls, convex cones). Mlpconv layer differs from maxout layer in that the convex function approximator is replaced by a universal function approximator, which has greater capability in modeling various distributions of latent concepts.

線性函數上的 Maxout 形成分段線性函數,該函數可以對任何凸函數建模。 對於凸函數,函數值低於特定閾值的樣本將形成凸集。因此,通過近似局部色塊的凸函數,maxout 可以為樣本在凸集合內的概念(即 l2 球,凸錐)形成分離超平面。Mlpconv 層 與 maxout 層的不同之處在於,凸函數逼近器被通用函數逼近器替代,通用函數逼近器在建模各種潛在概念分佈時具有更大的功能。

-----

3.2 Global Average Pooling

3.2 全局平均池化

Conventional convolutional neural networks perform convolution in the lower layers of the network. For classification, the feature maps of the last convolutional layer are vectorized and fed into fully connected layers followed by a softmax logistic regression layer [4] [8] [11]. This structure bridges the convolutional structure with traditional neural network classifiers. It treats the convolutional layers as feature extractors, and the resulting feature is classified in a traditional way.

傳統的卷積神經網路在網路的較低層中執行卷積。 為了進行分類,將最後一個卷積層的特徵圖向量化,並饋入全連接層,然後再輸入softmax logistic 回歸層[4] [8] [11]。 這種結構溝通卷積結構與傳統神經網路分類器。 它將卷積層視為特徵提取器,然後以傳統方式對生成的特徵進行分類。

However, the fully connected layers are prone to overfitting, thus hampering the generalization ability of the overall network. Dropout is proposed by Hinton et al. [5] as a regularizer which randomly sets half of the activations to the fully connected layers to zero during training. It has improved the generalization ability and largely prevents overfitting [4].

但是,全連接層容易過度擬合,進而妨礙了整個網路的泛化能力。 Dropout 由 Hinton 等人提出。 [5] 作為正則化器,它在訓練過程中將全連接層的一半激活隨機設置為零。 它提高了泛化能力,並在很大程度上防止了過擬合 [4]。

In this paper, we propose another strategy called global average pooling to replace the traditional fully connected layers in CNN. The idea is to generate one feature map for each corresponding category of the classification task in the last mlpconv layer. Instead of adding fully connected layers on top of the feature maps, we take the average of each feature map, and the resulting vector is fed directly into the softmax layer. One advantage of global average pooling over the fully connected layers is that it is more native to the convolution structure by enforcing correspondences between feature maps and categories. Thus the feature maps can be easily interpreted as categories confidence maps. Another advantage is that there is no parameter to optimize in the global average pooling thus overfitting is avoided at this layer. Futhermore, global average pooling sums out the spatial information, thus it is more robust to spatial translations of the input.

在本論文中,我們提出了另一種稱為全局平均池化的策略,以取代 CNN 中的傳統全連接層。 這個想法是為最後一個 mlpconv 層中分類任務的每個對應類別生成一個特徵圖。 我們沒有在特徵圖的頂部添加全連接層,而是取每個特徵圖的平均值,然後將所得的向量直接輸入到 softmax 層中。全局平均池化在全連接層上的優勢之一是,通過強制執行特徵圖和類別之間的對應關係,對於卷積結構而言,是更自然的事。因此,特徵圖可以容易地解釋為類別置信度圖。 另一個優點是,在全局平均池化中沒有要優化的參數,因此在此層避免了過擬合。 此外,全局平均池化匯總了空間信息,因此對輸入的空間轉換更加穩健。

We can see global average pooling as a structural regularizer that explicitly enforces feature maps to be confidence maps of concepts (categories). This is made possible by the mlpconv layers, as they makes better approximation to the confidence maps than GLMs.

我們可以將全局平均池化視為一種結構化的正則化器,它可以明確地將特徵圖強制化為概念(類別)的置信度圖。 mlpconv 層使這成為可能,因為它們比 GLM 更近似置信度圖。

3.3 Network In Network Structure

3.3 網路中的網路結構

The overall structure of NIN is a stack of mlpconv layers, on top of which lie the global average pooling and the objective cost layer. Sub-sampling layers can be added in between the mlpconv layers as in CNN and maxout networks. Figure 2 shows an NIN with three mlpconv layers. Within each mlpconv layer, there is a three-layer perceptron. The number of layers in both NIN and the micro networks is flexible and can be tuned for specific tasks.

NIN 的總體結構是一疊 mlpconv 層,其上是全局平均池化和輸出層。 像 CNN 和 maxout 網路一樣,可以在 mlpconv 層之間添加子採樣層。 圖2 顯示了具有三個 mlpconv 層的 NIN。 在每個 mlpconv 層中,都有一個三層感知器。 NIN 和微網路中的層數都很靈活,可以針對特定任務進行調整。

-----

4 Experiments

4 實驗

4.1 Overview

4.1概述

We evaluate NIN on four benchmark datasets: CIFAR-10 [12], CIFAR-100 [12], SVHN [13] and MNIST [1]. The networks used for the datasets all consist of three stacked mlpconv layers, and the mlpconv layers in all the experiments are followed by a spatial max pooling layer which downsamples the input image by a factor of two. As a regularizer, dropout is applied on the outputs of all but the last mlpconv layers. Unless stated specifically, all the networks used in the experiment section use global average pooling instead of fully connected layers at the top of the network. Another regularizer applied is weight decay as used by Krizhevsky et al. [4]. Figure 2 illustrates the overall structure of NIN network used in this section. The detailed settings of the parameters are provided in the supplementary materials. We implement our network on the super fast cuda-convnet code developed by Alex Krizhevsky [4]. Preprocessing of the datasets, splitting of training and validation sets all follow Goodfellow et al. [8].

我們在四個基準資料集上評估 NIN:CIFAR-10 [12],CIFAR-100 [12],SVHN [13] 和 MNIST [1]。 用於資料集的網路均由三個堆疊的 mlpconv 層組成,並且在所有實驗中的 mlpconv 層之後是一個空間最大池化層,該層將輸入圖像下採樣兩倍。 作為正則化器,dropout 將濾除應用於除最後 mlpconv 層以外的所有層的輸出。除非特別說明,否則實驗部分中使用的所有網路均使用全局平均池化,而不是網路頂部的全連接層。 Krizhevsky 等人使用的另一個正則化器是權重衰減 [4]。圖2 說明了本節中使用的 NIN 網路的整體結構。 參數的詳細設置在補充材料中提供。 我們在 Alex Krizhevsky [4] 開發的超快速 cuda-convnet 代碼上實現我們的網路。 資料集的預處理,訓練和驗證集的劃分均遵循 Goodfellow 等人的方法 [8]。

We adopt the training procedure used by Krizhevsky et al. [4]. Namely, we manually set proper initializations for the weights and the learning rates. The network is trained using mini-batches of size 128. The training process starts from the initial weights and learning rates, and it continues until the accuracy on the training set stops improving, and then the learning rate is lowered by a scale of 10. This procedure is repeated once such that the final learning rate is one percent of the initial value.

我們採用 Krizhevsky 等人使用的訓練程序 [4]。 即,我們手動設置權重和學習率的適當初始化。 使用大小為 128 的迷你批次對網路進行訓練。訓練過程從初始權重和學習率開始,一直持續到訓練集的準確性停止提高,然後將學習率降低 10 級。 重複此過程一次,以使最終學習率是初始值的百分之一。

4.2 CIFAR-10

4.2 CIFAR-10

The CIFAR-10 dataset [12] is composed of 10 classes of natural images with 50,000 training images in  total, and 10,000 testing images. Each image is an RGB image of size 32x32. For this dataset, we apply the same global contrast normalization and ZCA whitening as was used by Goodfellow et al. in the maxout network [8]. We use the last 10,000 images of the training set as validation data.

CIFAR-10 資料集 [12] 由 10 類自然圖像組成,總共有 50,000 個訓練圖像和 10,000 個測試圖像。 每個圖像都是大小為 32x32 的 RGB 圖像。 對於此資料集,我們應用與 Goodfellow 等人相同的全局對比度歸一化和 ZCA 白化。 在 maxout 網路中 [8]。 我們使用訓練集的最後 10,000 張圖像作為驗證資料。

The number of feature maps for each mlpconv layer in this experiment is set to the same number as in the corresponding maxout network. Two hyper-parameters are tuned using the validation set, i.e. the local receptive field size and the weight decay. After that the hyper-parameters are fixed and we re-train the network from scratch with both the training set and the validation set. The resulting model is used for testing. We obtain a test error of 10.41% on this dataset, which improves more than one percent compared to the state-of-the-art. A comparison with previous methods is shown in Table 1.

在此實驗中,每個 mlpconv 層的特徵圖數量設置為與相應的 maxout 網路中相同的數量。 使用驗證集調整兩個超參數,即局部感受野大小和權重衰減。 之後,超參數被固定,我們使用訓練集和驗證集從頭開始重新訓練網路。 生成的模型用於測試。 在此資料集上,我們獲得了 10.41% 的測試誤差,與最新技術相比,該誤差提高了百分之一以上。 表1 中顯示了與先前方法的比較。

It turns out in our experiment that using dropout in between the mlpconv layers in NIN boosts the performance of the network by improving the generalization ability of the model. As is shown in Figure 3, introducing dropout layers in between the mlpconv layers reduced the test error by more than 20%. This observation is consistant with Goodfellow et al. [8]. Thus dropout is added in between the mlpconv layers to all the models used in this paper. The model without dropout regularizer achieves an error rate of 14.51% for the CIFAR-10 dataset, which already surpasses many previous state-of-the-arts with regularizer (except maxout). Since performance of maxout without dropout is not available, only dropout regularized version are compared in this paper.

在我們的實驗中發現,在 NIN 的 mlpconv 層之間使用 dropout 可以通過提高模型的泛化能力來提高網路的性能。 如圖3 所示,在 mlpconv 層之間引入 dropout 層可將測試誤差降低 20% 以上。 該觀察與 Goodfellow 等人一致  [8]。因此,在 mlpconv 層之間將 dropout 添加到了本文使用的所有模型中。 對於 CIFAR-10 資料集,不帶 dropout 正則化器的模型的錯誤率達到 14.51%,這已經超過了許多具有正則化器的最新技術水平(maxout 除外)。 由於沒有可用的沒有 dropout 的 maxout 的性能不可用,因此本文僅比較 dropout 的正規化版本。

To be consistent with previous works, we also evaluate our method on the CIFAR-10 dataset with translation and horizontal flipping augmentation. We are able to achieve a test error of 8.81%, which sets the new state-of-the-art performance.

為了與以前的工作保持一致,我們還使用平移和水平翻轉增強在CIFAR-10數據集上評估了我們的方法。 我們能夠實現 8.81% 的測試誤差,這設定了新的卓越性能。

4.3 CIFAR-100

4.3 CIFAR-100

The CIFAR-100 dataset [12] is the same in size and format as the CIFAR-10 dataset, but it contains 100 classes. Thus the number of images in each class is only one tenth of the CIFAR-10 dataset. For CIFAR-100 we do not tune the hyper-parameters, but use the same setting as the CIFAR-10 dataset. The only difference is that the last mlpconv layer outputs 100 feature maps. A test error of 35.68% is obtained for CIFAR-100 which surpasses the current best performance without data augmentation by more than one percent. Details of the performance comparison are shown in Table 2.

CIFAR-100 資料集 [12 ]的大小和格式與 CIFAR-10 資料集相同,但包含 100 個類。 因此,每個類別中的圖像數量僅為 CIFAR-10 資料集的十分之一。 對於 CIFAR-100,我們不調整超參數,但使用與 CIFAR-10 資料集相同的設置。 唯一的區別是最後一個 mlpconv 層輸出 100 個特徵圖。 CIFAR-100 的測試誤差為 35.68%,在沒有資料擴充的情況下超過了目前的最佳性能百分之一。 表2 中顯示了性能比較的細節。

4.4 Street View House Numbers

4.4 Street View House Numbers

The SVHN dataset [13] is composed of 630,420 32x32 color images, divided into training set, testing set and an extra set. The task of this data set is to classify the digit located at the center of each image. The training and testing procedure follow Goodfellow et al. [8]. Namely 400 samples per class selected from the training set and 200 samples per class from the extra set are used for validation. The remainder of the training set and the extra set are used for training. The validation set is only used as a guidance for hyper-parameter selection, but never used for training the model.

SVHN 資料集 [13] 由 630,420 個 32x32 彩色圖像組成,分為訓練集,測試集和額外集。 該資料集的任務是對位於每個圖像中心的數字進行分類。 訓練和測試程序遵循 Goodfellow 等 [8]。 即,從訓練集中選擇的每個類別 400 個樣本和從額外集中的每個類別 200 個樣本用於驗證。 訓練集的其餘部分和額外集用於訓練。 驗證集僅用作超參數選擇的參考,而從未用於訓練模型。

Preprocessing of the dataset again follows Goodfellow et al. [8], which was a local contrast normalization. The structure and parameters used in SVHN are similar to those used for CIFAR-10, which consist of three mlpconv layers followed by global average pooling. For this dataset, we obtain a test error rate of 2.35%. We compare our result with methods that did not augment the data, and the comparison is shown in Table 3.

資料集的預處理再次遵循 Goodfellow 等 [8],這是局部對比度歸一化。 SVHN 中使用的結構和參數類似於 CIFAR-10 中使用的結構和參數,它由三個 mlpconv 層組成,然後進行全局平均池化。 對於此資料集,我們獲得 2.35% 的測試錯誤率。 我們將結果與未擴充資料的方法進行比較,比較結果如表3 所示。

4.5 MNIST

4.5 MNIST

The MNIST [1] dataset consists of hand written digits 0-9 which are 28x28 in size. There are 60,000 training images and 10,000 testing images in total. For this dataset, the same network structure as used for CIFAR-10 is adopted. But the numbers of feature maps generated from each mlpconv layer are reduced. Because MNIST is a simpler dataset compared with CIFAR-10; fewer parameters are needed. We test our method on this dataset without data augmentation. The result is compared with previous works that adopted convolutional structures, and are shown in Table 4.

MNIST [1] 資料集由大小為 28x28 的手寫數字 0-9 組成。 總共有 60,000 張訓練圖像和 10,000 張測試圖像。 對於此資料集,採用與 CIFAR-10 相同的網路結構。 但是減少了從每個 mlpconv 層生成的特徵圖的數量。 因為與 CIFAR-10 相比,MNIST 是更簡單的資料集; 需要的參數更少。 我們在沒有資料擴充的情況下在此資料集上測試了我們的方法。 將結果與採用卷積結構的以前的作品進行比較,如表4 所示。

We achieve comparable but not better performance (0.47%) than the current best (0.45%) since MNIST has been tuned to a very low error rate.

由於 MNIST 已調整到非常低的錯誤率,因此我們獲得的性能(0.47%)與目前的最佳性能(0.45%)接近,但並不比其高。

4.6 Global Average Pooling as a Regularizer

4.6 全局平均池化作為正則器

Global average pooling layer is similar to the fully connected layer in that they both perform linear transformations of the vectorized feature maps. The difference lies in the transformation matrix. For global average pooling, the transformation matrix is prefixed and it is non-zero only on block diagonal elements which share the same value. Fully connected layers can have dense transformation matrices and the values are subject to back-propagation optimization. To study the regularization effect of global average pooling, we replace the global average pooling layer with a fully connected layer, while the other parts of the model remain the same. We evaluated this model with and without dropout before the fully connected linear layer. Both models are tested on the CIFAR-10 dataset, and a comparison of the performances is shown in Table 5.

全局平均池化層與全連接層相似,因為它們都執行向量化特徵圖的線性變換。 區別在於變換矩陣。 對於全局平均池化,轉換矩陣帶有前綴,並且僅在共享相同值的塊對角線元素上為非零。 全連接層可以具有密集的轉換矩陣,並且值需要進行反向傳播優化。 為了研究全局平均池化的正則化效果,我們用全連接層替換了全局平均池層,而模型的其他部分保持不變。 我們評估了該模型在全連接的線性層之前有無漏失的情況。 兩種模型都在 CIFAR-10 資料集上進行了測試,其性能比較如表5 所示。

As is shown in Table 5, the fully connected layer without dropout regularization gave the worst performance (11.59%). This is expected as the fully connected layer overfits to the training data if no regularizer is applied. Adding dropout before the fully connected layer reduced the testing error (10.88%). Global average pooling has achieved the lowest testing error (10.41%) among the three.

如表5 所示,沒有 dropout 正規則化的全連接層有最差的性能(11.59%)。 這是可以預期的,因為如果未應用任何正則化器,則全連接層將過度擬合訓練資料。 在全連接層之前添加 dropout 可減少測試誤差(10.88%)。 全局平均池化已實現三項中最低的測試錯誤(10.41%)。

We then explore whether the global average pooling has the same regularization effect for conventional CNNs. We instantiate a conventional CNN as described by Hinton et al. [5], which consists of three convolutional layers and one local connection layer. The local connection layer generates 16 feature maps which are fed to a fully connected layer with dropout. To make the comparison fair, we reduce the number of feature map of the local connection layer from 16 to 10, since only one feature map is allowed for each category in the global average pooling scheme. An equivalent network with global average pooling is then created by replacing the dropout + fully connected layer with global average pooling. The performances were tested on the CIFAR-10 dataset.

然後,我們探討了全局平均池化是否具有與常規 CNN 相同的正則化效果。 我們實做了傳統的 CNN,如 Hinton 等人所述 [5],它由三個卷積層和一個局部接層組成。 局部連接層生成 16 個特徵圖,這些特徵圖通過 dropout 被饋送到全連接層。為了使比較合理,我們將局部連接層的特徵圖的數量從 16 個減少到 10 個,因為全局平均池化方案中的每個類別只允許一個特徵圖。 然後,通過使用全局平均池化替換 dropout + 全連接層,創建具有全局平均池化的等效網路。 在 CIFAR-10 資料集上對性能進行了測試。

This CNN model with fully connected layer can only achieve the error rate of 17.56%. When dropout is added we achieve a similar performance (15.99%) as reported by Hinton et al. [5]. By replacing the fully connected layer with global average pooling in this model, we obtain the error rate of 16.46%, which is one percent improvement compared with the CNN without dropout. It again verifies the effectiveness of the global average pooling layer as a regularizer. Although it is slightly worse than the dropout regularizer result, we argue that the global average pooling might be too demanding for linear convolution layers as it requires the linear filter with rectified activation to model the confidence maps of the categories.

這種具有全連接層的 CNN 模型只能達到 17.56% 的錯誤率。 當添加 dropout 時,我們將獲得與 Hinton 等人報告的相似的性能(15.99%) [5]。 通過在此模型中用全局平均池化替換全連接層,我們獲得了 16.46% 的錯誤率,與沒有 drop 的 CNN 相比,錯誤率提高了百分之一。這再次驗證了全局平均池化層作為正則化器的有效性。 儘管它比 dropout 正則化器結果稍差,但我們認為全局平均池化對於線性卷積層可能要求太高,因為它需要具有整流激活的線性濾波器來建模類別的置信度圖。

4.7 Visualization of NIN

4.7 NIN 的可視化

We explicitly enforce feature maps in the last mlpconv layer of NIN to be confidence maps of the categories by means of global average pooling, which is possible only with stronger local receptive field modeling, e.g. mlpconv in NIN. To understand how much this purpose is accomplished, we extract and directly visualize the feature maps from the last mlpconv layer of the trained model for CIFAR-10.

我們通過全局平均池化將 NIN 的最後一個 mlpconv 層中的特徵圖顯式強制為類別的置信度圖,這僅在更強大的局部感受野建模(例如 NIN 中的 mlpconv)。 要了解達到此目的的程度,我們從 CIFAR-10 的訓練模型的最後 mlpconv 層提取並直接可視化特徵圖。

Figure 4 shows some examplar images and their corresponding feature maps for each of the ten categories selected from CIFAR-10 test set. It is expected that the largest activations are observed in the feature map corresponding to the ground truth category of the input image, which is explicitly enforced by global average pooling. Within the feature map of the ground truth category, it can be observed that the strongest activations appear roughly at the same region of the object in the original image. It is especially true for structured objects, such as the car in the second row of Figure 4. Note that the feature maps for the categories are trained with only category information. Better results are expected if bounding boxes of the objects are used for fine grained labels.

圖4 顯示了從 CIFAR-10 測試集中選擇的十個類別中的每個類別的一些範例圖像及其對應的特徵圖。 預計在與輸入圖像的基準真相類別相對應的特徵圖中會觀察到最大的激活,這明顯是通過全局平均池化實施的。在基準真相類別的特徵圖中,可以觀察到最強的激活大致出現在原始圖像中物件的同一區域。 對於結構化物件(例如圖4 第二行中的汽車)尤其如此。請注意,僅使用類別資訊來訓練類別的特徵圖。 如果將物件的邊界框用於細粒度標籤,則預期會獲得更好的結果。

The visualization again demonstrates the effectiveness of NIN. It is achieved via a stronger local receptive field modeling using mlpconv layers. The global average pooling then enforces the learning of category level feature maps. Further exploration can be made towards general object detection. Detection results can be achieved based on the category level feature maps in the same flavor as in the scene labeling work of Farabet et al. [20].

可視化再次證明了 NIN 的有效性。 這是通過使用 mlpconv 層進行更強的局部感受野建模來實現的。 然後,全局平均池化將強制執行類別級別特徵圖的學習。 可以對一般物件偵測進行進一步的探索。 可以基於類別級別特徵圖以與 Farabet 等人的場景標記工作相同的方式獲得檢測結果 [20]。

5 Conclusions

5 結論

We proposed a novel deep network called “Network In Network” (NIN) for classification tasks. This new structure consists of mlpconv layers which use multilayer perceptrons to convolve the input and a global average pooling layer as a replacement for the fully connected layers in conventional CNN. Mlpconv layers model the local patches better, and global average pooling acts as a structural regularizer that prevents overfitting globally. With these two components of NIN we demonstrated state-of-the-art performance on CIFAR-10, CIFAR-100 and SVHN datasets. Through visualization of the feature maps, we demonstrated that feature maps from the last mlpconv layer of NIN were confidence maps of the categories, and this motivates the possibility of performing object detection via NIN.

我們為分類任務提出了一種新穎的深度網路,稱為“網路中的網路”(NIN)。 這種新結構由 mlpconv 層組成,這些層使用多層感知器對輸入進行卷積,並使用全局平均池化層替代了傳統 CNN 中的全連接層。 Mlpconv 層可以更好地對局部色塊進行建模,而全局平均池化則可以作為結構性正則化器,防止全局過度擬合。使用 NIN 的這兩個組件,我們展示在了 CIFAR-10,CIFAR-100 和 SVHN 資料集上的超卓性能。 通過特徵圖的可視化,我們證明了 NIN 的最後一個 mlpconv 層的特徵圖是類別的置信度圖,這激勵了通過 NIN 執行物件偵測的可能性。

-----

# NIN。

Lin, Min, Qiang Chen, and Shuicheng Yan. "Network in network." arXiv preprint arXiv:1312.4400 (2013).

https://arxiv.org/pdf/1312.4400.pdf

-----

Saturday, April 10, 2021

AlexNet(四):Appendix

 AlexNet(四):Appendix

2021/04/10

-----

-----

以下只列出論文

-----


# PreAlexNet


# PreZFNet


# Deconv


Cam


GradCam


GradCam++


ScoreCam


-----

AlexNet(三):Illustrated

AlexNet(三):Illustrated 

2020/12/31

-----

前言:

AlexNet 在模型設計(含 ReLU)之外,最重要的三個主題是 dropout、momentum、與 weight decay。第一次閱讀時,momentum 與 weight decay 容易被忽略。

-----


https://pixabay.com/zh/photos/berlin-tv-tower-skyline-alex-4001319/

-----

2 The Dataset

-----

3.1 ReLU Nonlinearity

-----


Fig. 25. Pictorial representation of Rectified Linear Unit (ReLU)

圖25. 整流線性單元(ReLU)的圖示。

# History DL

-----


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 regularization 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 的網路的學習速度始終比具有飽和神經元的等效網路快幾倍。

# AlexNet

說明:

ReLU 比 tanh 更快收斂。

-----


Fig. 26. Diagram for (a) Leaky ReLU (b) Exponential Linear Unit (ELU)

圖26.(a)Leaky(洩漏的) ReLU(b)指數線性單位(ELU)的圖示。

# History DL

說明:

1. sigmoid

2. tanh(Hyperbolic Tangent)

3. ReLU(Rectified Liner Unit)

4. Leaky ReLU and Parametric ReLU

5. ELU(Exponential Linear Unit)


1. sigmoid:三大缺點。梯度消失(導數最大為 0.25)。輸出非 zero-centered。冪運算耗時。

2. tanh:改善輸出非 zero-centered。

3. ReLU(非全區間可微,可取次梯度)。優點:在正區間(解決梯度消失的問題),計算速度快,收斂速度快。缺點:輸出非 zero-centered。Dead ReLU 可以使用 Xavier 設定初值。

4. Leaky ReLU and Parametric ReLU:0x 的部分改為 0.01x 或 ax,a 由訓練得來。避免 Dead ReLU,理論上比較好,實際上未必。

5. ELU(Exponential Linear Unit):沒有 ReLU 的缺點。但也是慢。理論上比較好,實際上未必。


https://zhuanlan.zhihu.com/p/25110450

http://howrudatou.blogspot.com/2016/12/mlcs231n-training-neural-networks-1.html

-----

3.2 Training on Multiple GPUs

ResNeXt


Figure 1. Left: A block of ResNet [14]. Right: A block of ResNeXt with cardinality = 32, with roughly the same complexity. A layer is shown as (# in channels, filter size, # out channels).

圖1. 左:ResNet 的一個塊 [14]。 右:基數 = 32的 ResNeXt 塊,其複雜度大致相同。 圖層顯示為(#輸入通道,過濾器大小,#輸出通道)。

# ResNeXt

說明:

AlexNet 受限於當時 GPU 的內存不足,將資料分成兩個 group,但後來 ResNeXt 導入多 group 效能很棒。

-----


Figure 2. Normalization methods. Each subplot shows a feature map tensor. The pixels in blue are normalized by the same mean and variance, computed by aggregating the values of these pixels. Group Norm is illustrated using a group number of 2.

圖2. 標準化的方法。 每個子圖都顯示一個特徵圖張量。 藍色像素通過相同的均值和方差標準化,該均值和方差是通過匯總這些像素的值而得出的。 群組標準化使用 2 的組號進行說明。

# Group Normalization

說明:

ResNeXt 也帶給 Group Normalization 靈感。

-----


# Group Normalization

說明:

reshape 簡單說是可以把向量轉成多維矩陣。實際上是多維矩陣的轉換。元素個數不變,維度改變。

https://www.delftstack.com/zh-tw/tutorial/python-numpy/numpy-array-reshape-and-resize/

https://www.tensorflow.org/api_docs/python/tf/reshape

-----

3.3 Local Response Normalization


# AlexNet

說明:

是一個過時的專家方法。在 GoogLeNet 裡面認為有用,在 VGGNet 裡面認為沒用。實際上 Conv1 更一般化且結果更好。

-----

3.4 Overlapping Pooling

此節沒有圖。

-----


# LeNet。

說明:

LeNet 有 CNN 基本的架構。

-----


Figure 1: Architecture of a convolutional neural network. In this case, the convolutional layers are fully connected. Both convolutional layers use a kernel of 5 x 5 and skipping factors of 1.

圖1:卷積神經網路的架構。 在這個例子中,卷積層是全連接的。 兩個卷積層都使用 5 x 5 的內核和 1 的步長。

# PreVGGNet。

說明:

使用 GPU。小型資料集。加寬無效,加深有效。

-----



Table 1: Error rates on MNIST test set for randomly connected CNNs with 2 to 6 convolutional layers with M Maps and an optional fully connected layer with N neurons. Various kernel sizes and skipping factors were used.

表1:對於具有 2 到 6 個具有 M 個特徵圖的卷積層和 N 個可加選的神經元的全連接層的隨機連接的 CNN,MNIST 測試集的錯誤率。 使用了各種內核大小和跳過因子。

# PreVGGNet

說明:

加深有效。

-----


Table 3: Average error rates and standard deviations for N runs of an eight hidden layer CNN on the CIFAR10 test set (see text for details). The first five nets have 100 maps per convolutional and max-pooling layer, whereas the sixth, seventh and eighth have 200, 300 and 400 maps per hidden layer, respectively. IP - image processing layer: edge - 3 x 3 Sobel and Scharr filters; hat -13 x 13 positive and negative contrast extraction filters.

表3:CIFAR10 測試集上八個隱藏層 CNN 的 N次 運行的平均錯誤率和標準差(有關詳細信息,請參見文本)。 前五個網路的每個卷積和最大池化層都有 100 張特徵圖,而第六,第七和第八個網路的每個隱藏層分別有 200、300 和 400 張特徵圖。 IP-圖像處理層:邊緣-3 x 3  Sobel 和 Scharr 濾波器; 帽子- 13 x 13 正負對比提取濾波器。

# PreVGGNet

說明:

加寬無效。

-----


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 在圖的底部運行圖層部分。 GPU 僅在某些層進行通信。 網路的輸入為 150,528 維,網路其餘層的神經元數量為 253,440–186,624–64,896–64,896–43,264–4096–4096-1000。

# AlexNet。

說明:

AlexNet 加深、加大網路。

-----

4.1 Data Augmentation

-----


Figure 3: 96 convolutional kernels of size 11 x 11 x 3 learned by the first convolutional layer on the 224 x 224 x 3 input images. The top 48 kernels were learned on GPU 1 while the bottom 48 kernels were learned on GPU 2. See Section 6.1 for details.

圖3:在 224 x 224 x 3 輸入圖像上的第一個卷積層學習到的大小為 11 x 11 x 3 的 96 個卷積核。 前 48 個內核是在 GPU 1 上學習的,而後 48 個內核是在 GPU 2 上學習的。細節請參見 6.1 節。

# AlexNet

說明:

兩種資料擴增的方法造成兩類核的呈現。上面是一般擴充。下面是色彩強度轉換的擴充。

-----


Fig. 3. Architecture of our 8 layer convnet model. A 224 by 224 crop of an image (with 3 color planes) is presented as the input. This is convolved with 96 different 1st layer filters (red), each of size 7 by 7, using a stride of 2 in both x and y. The resulting feature maps are then: (i) passed through a rectified linear function (not shown), (ii) pooled (max within 3x3 regions, using stride 2) and (iii) contrast normalized across feature maps to give 96 different 55 by 55 element feature maps. Similar operations are repeated in layers 2,3,4,5. The last two layers are fully connected, taking features from the top convolutional layer as input in vector form (6 · 6 · 256 = 9216 dimensions). The final layer is a C-way softmax function, C being the number of classes. All filters and feature maps are square in shape.

圖3. 我們的 8 層卷積網路模型的架構。 輸入圖像為 224 x 224 裁切(帶有3個彩色平面)。 將其與 96 個不同的第一層濾鏡(紅色)進行卷積,每個濾鏡的大小為 7×7,x 和 y 的步長均為 2。 然後,將生成的特徵圖:(i)通過整流線性函數(未顯示),(ii)合併(3x3 區域內的最大值,使用步長 2),並且(iii)跨特徵圖的對比度標準化,得出 96 種不同的 55 x 55 個要素特徵圖。 在第 2、3、4、5 層中重複類似的操作。 最後兩層是全連接,將來自頂部卷積層的要素作為向量形式的輸入(6·6·256 = 9216 維度)。 最後一層是 C-路 softmax 函數,C 是類別數。 所有濾波器和特徵圖均為正方形。

# ZFNet

說明:

ZFNet 相比 AlexNet,其中一個特點是第一個卷積層的 size 跟 stride 都縮小,提升解析度,也帶給 VGGNet 靈感。

-----


Fig. 5. 1st layer features without feature scale clipping. Note that one feature dominates. (a): 1st layer features from Krizhevsky et al. [18]. (b): Our 1st layer features. The smaller stride (2 vs 4) and filter size (7x7 vs 11x11) results in more distinctive features and fewer “dead” features. (c): Visualizations of 2nd layer features from Krizhevsky et al. [18]. (d): Visualizations of our 2nd layer features. These are cleaner, with no aliasing artifacts that are visible in (c).

圖5. 沒有特徵比例裁剪的第一層特徵。 請注意,一個特徵主導。 (a):Krizhevsky 等人的第 1 層特徵。 [18]。 (b):我們的第一層特徵。 較小的步長(2對4)和濾波器大小(7x7 對 11x11)可提供更多獨特的特徵和更少的“死”特徵。 (c):Krizhevsky 等人第二層特徵的可視化 [18]。 (d):第二層特徵的可視化。 這些更乾淨,沒有在(c)中可見的混疊偽影。

# ZFNet

說明:

第一層卷積核步長縮小,讓解析效果提升。

-----


# VGGNet

Table 1: ConvNet configurations (shown in columns). The depth of the configurations increases from the left (A) to the right (E), as more layers are added (the added layers are shown in bold). The convolutional layer parameters are denoted as “convhreceptive field sizei-hnumber of channelsi”. The ReLU activation function is not shown for brevity.

表1:ConvNet 配置(在欄中顯示)。 隨著添加更多的層(添加的層以粗體顯示),配置的深度從左側(A)到右側(E)增大。 卷積層參數被表示為“感受域大小-通道數”。 為簡潔起見,未顯示 ReLU 激活函數。

說明:

經由 ZFNet 縮小第一層卷積核的靈感,採用兩個 3x3 代替一個 5x5,反覆加深。

-----


# VGGNet

說明:

19 層比 16 層好一點點。繼續加深則變差。

-----


# Highway v2

說明:

1. y = H,是 block。

2. x,是 identity mapping。

3. T 跟 C 是係數。方便起見,令 C = 1 - T,則 T 跟 C 的總和為 1。

4. 極端的例子,維持原轉換或者不轉換,但不會有 ResNet 的情形發生。ResNet 基本上是單位轉換加上殘差。

-----


# Highway v2

說明:

對公式四求導。本例子為 GRU 的簡化,論文中另外提到有 LSTM 簡化的例子。

-----


Figure 1. Comparison of optimization of plain networks and highway networks of various depths. All networks were optimized using SGD with momentum. The curves shown are for the best hyperparameter settings obtained for each configuration using a random search. Plain networks become much harder to optimize with increasing depth, while highway networks with up to 100 layers can still be optimized well.

圖1. 各種深度的一般網路和公路網路的優化比較。 所有網路都使用 SGD 進行了優化。 顯示的曲線是使用隨機搜索為每種配置獲得的最佳超參數設置的。 隨著深度的增加,一般網路變得越來越難以優化,而高達 100 層的公路網路仍然可以很好地進行優化。

# Highway v1

說明:

在 VGGNet 的十九層網路之後,增加了 C 的公路網路可以達到百層。

-----


Figure 1: Comparison of optimization of plain networks and highway networks of various depths. Left: The training curves for the best hyperparameter settings obtained for each network depth. Right: Mean performance of top 10 (out of 100) hyperparameter settings. Plain networks become much harder to optimize with increasing depth, while highway networks with up to 100 layers can still be optimized well. Best viewed on screen (larger version included in Supplementary Material).

圖1:各種深度的一般網路和公路網路的優化比較。 左:針對每個網路深度獲得最佳超參數設置的訓練曲線。 右:前 10 個( 從 100 個裡面)超參數設置的平均性能。 隨著深度的增加,一般網路變得越來越難以優化,而高達 100 層的公路網路仍然可以很好地進行優化。 最好在屏幕上觀看(補充材料中包含較大的版本)。

# Highway v2

說明:

在 VGGNet 的十九層網路之後,增加了 C 的公路網路可以達到百層。

-----

4.2 Dropout


Figure 1: Dropout Neural Net Model. Left: A standard neural net with 2 hidden layers. Right: An example of a thinned net produced by applying dropout to the network on the left. Crossed units have been dropped.

圖1:Dropout 神經網路模型。 左:具有 2 個隱藏層的標準神經網路。 右圖:通過對左圖的網路應用 dropout 產生的變細網路的範例。 交叉單元表示已被丟棄。

# Dropout

說明:

隨機丟棄神經元。最後再將所有模型平均。

-----


Figure 2: Left: A unit at training time that is present with probability p and is connected to units in the next layer with weights w. Right: At test time, the unit is always present and the weights are multiplied by p. The output at test time is same as the expected output at training time.

圖2:左圖:訓練時以概率 p 出現的單元,並連接到權重為 w 的下一層的單元。 右:在測試時,單元永遠都在,此時的權重要乘以 p。 測試時的輸出與訓練時的預期輸出相同。

說明:

每次丟棄神經元的機率是 p,平均後的模型,權重乘以 p。

-----


Figure 1. (a): An example model layout for a single DropConnect layer. After running feature extractor g() on input x, a random instantiation of the mask M (e.g. (b)), masks out the weight matrix W. The masked weights are multiplied with this feature vector to produce u which is the input to an activation function a and a softmax layer s. For comparison, (c) shows an effective weight mask for elements that Dropout uses when applied to the previous layer's output (red columns) and this layer's output (green rows). Note the lack of structure in (b) compared to (c).

圖1.(a):單個 DropConnect 層的示範模型佈局。 在輸入 x 上執行特徵提取器 g()之後,遮罩 M(例如(b))的隨機實例將權重矩陣 W 掩碼。將掩碼後的權重與該特徵向量相乘以產生 u,這是 u 的輸入。 激活函數 a 和 softmax 層 s。 為了進行比較,(c)顯示了Dropout 在應用於上一層的輸出(紅色列)和該層的輸出(綠色行)時使用的元素的有效權重掩碼。 請注意,與(c)相比,缺乏(b)中的結構。


# DropConnect

說明:

Dropout 的一般化。隨機丟棄連結。這邊列出的是一次的例子,DropConnect 看似比較有變化,Dropout 比較單調。但是 Dropout 每次丟棄的神經元其實不一樣。所以 Dropout 不會明顯比較差。

-----


Table 1: Comparison of results on ILSVRC- 2010 test set. In italics are best results achieved by others.

表1:ILSVRC-2010 測試集的結果比較。 斜體字是他人獲得的最佳結果。

# AlexNet

說明:

比之前好很多。

-----


Table 2: Comparison of error rates on ILSVRC-2012 validation and test sets. In italics are best results achieved by others. Models with an asterisk* were “pre-trained” to classify the entire ImageNet 2011 Fall release. See Section 6 for details.

表2:ILSVRC-2012 驗證和測試集的錯誤率比較。 斜體字是他人獲得的最佳結果。 帶星號*的模型經過“預訓練”以對整個 ImageNet 2011 Fall 版本進行分類。 細節參考第 6 節。

# AlexNet

說明:

預訓練有比較好。ensemble 也比較好。

-----


Figure 4: (Left) Eight ILSVRC-2010 test images and the five labels considered most probable by our model. The correct label is written under each image, and the probability assigned to the correct label is also shown with a red bar (if it happens to be in the top 5). (Right) Five ILSVRC-2010 test images in the first column. The remaining columns show the six training images that produce feature vectors in the last hidden layer with the smallest Euclidean distance from the feature vector for the test image.

圖4 :(左)八個 ILSVRC-2010 測試圖像和我們的模型認為最可能的五個標籤。 正確的標籤寫在每個圖像下,並且分配給正確標籤的概率也用紅色條顯示(如果它恰好位於前 5 位)。 (右)第一列中的五張 ILSVRC-2010 測試圖像。 其餘的列顯示了六個訓練圖像,這些圖像在最後一個隱藏層中生成特徵向量,這些特徵向量與測試圖像的特徵向量之間的歐幾里德距離最小。

# AlexNet

Top - 5 的意思是,前五個可能,有一個是正確的。Top - 5 error rate 則是前五個可能,都不是正確的。

-----


# Optimization

說明:

考慮前一步的移動。可以減低震盪,加速前進。

-----


# Weight Decay

說明:

根據公式,每次更新權重時,不管權重有沒有更新,權重都會以(1 - λ)的比例縮小(往 0 移動),也就是,慢慢就會有一些權重的值消失不見。也就是說,參數量減少了。也就是說,避免 overfitting。

-----


# Weight Decay

說明:

L2 基本上是在損失函數的值之外,另外加一個單位圓的限制。損失函數的值雖然希望它很小,但太小的話就 overfitting 了。加一個懲罰項,避免損失函數的值過小。

選 λ' = λ / α,則兩者等價。

-----


# Weight Decay

說明:

紅色是 L2 的形式,如果要以 Weight Decay 的形式進行,要多乘以一個係數。

-----

Keras 實作

-----

http://hemingwang.blogspot.com/2021/03/keras-lenet.html

http://hemingwang.blogspot.com/2021/03/keras-alexnet.html

-----

References

[1] # AlexNet

Krizhevsky, Alex, Ilya Sutskever, and Geoffrey E. Hinton. "Imagenet classification with deep convolutional neural networks." Advances in neural information processing systems 25 (2012): 1097-1105.

https://proceedings.neurips.cc/paper/2012/file/c399862d3b9d6b76c8436e924a68c45b-Paper.pdf


[2] # LeNet。被引用 31707 次。經典的卷積神經網路,主要比 HDR 多了全連接層。

LeCun, Yann, et al. "Gradient-based learning applied to document recognition." Proceedings of the IEEE 86.11 (1998): 2278-2324.

http://yann.lecun.com/exdb/publis/pdf/lecun-01a.pdf


[3] # PreVGGNet

Cireşan, Dan C., et al. "High-performance neural networks for visual object classification." arXiv preprint arXiv:1102.0183 (2011).

https://arxiv.org/pdf/1102.0183.pdf


[4] # ZFNet

Zeiler, Matthew D., and Rob Fergus. "Visualizing and understanding convolutional networks." European conference on computer vision. Springer, Cham, 2014.

https://cdanfort.w3.uvm.edu/csc-reading-group/zeiler-eccv-2014.pdf


[5] # VGGNet

Simonyan, Karen, and Andrew Zisserman. "Very deep convolutional networks for large-scale image recognition." arXiv preprint arXiv:1409.1556 (2014).

https://arxiv.org/pdf/1409.1556.pdf


[6] # Highway v1

Srivastava, Rupesh Kumar, Klaus Greff, and Jürgen Schmidhuber. "Highway networks." arXiv preprint arXiv:1505.00387 (2015).

https://arxiv.org/pdf/1505.00387.pdf


[7] # Highway v2

Srivastava, Rupesh K., Klaus Greff, and Jürgen Schmidhuber. "Training very deep networks." Advances in neural information processing systems. 2015.

https://papers.nips.cc/paper/2015/file/215a71a12769b056c3c32e7299f1c5ed-Paper.pdf


[8] # History DL(ReLU)

Alom, Md Zahangir, et al. "The history began from alexnet: A comprehensive survey on deep learning approaches." arXiv preprint arXiv:1803.01164 (2018).

https://arxiv.org/ftp/arxiv/papers/1803/1803.01164.pdf


[9] # ResNeXt(Channel)

Xie, Saining, et al. "Aggregated residual transformations for deep neural networks." Proceedings of the IEEE conference on computer vision and pattern recognition. 2017.

https://openaccess.thecvf.com/content_cvpr_2017/papers/Xie_Aggregated_Residual_Transformations_CVPR_2017_paper.pdf


[10] # Group Normalization(Channel)

Wu, Yuxin, and Kaiming He. "Group normalization." Proceedings of the European conference on computer vision (ECCV). 2018.

https://openaccess.thecvf.com/content_ECCV_2018/papers/Yuxin_Wu_Group_Normalization_ECCV_2018_paper.pdf


[11] # Dropout

Srivastava, Nitish, et al. "Dropout: a simple way to prevent neural networks from overfitting." The journal of machine learning research 15.1 (2014): 1929-1958.

https://www.jmlr.org/papers/volume15/srivastava14a/srivastava14a.pdf


[12] # DropConnect

Wan, Li, et al. "Regularization of neural networks using dropconnect." International conference on machine learning. PMLR, 2013.

http://proceedings.mlr.press/v28/wan13.pdf


[13] # Optimization(Momentum)

Ruder, Sebastian. "An overview of gradient descent optimization algorithms." arXiv preprint arXiv:1609.04747 (2016).

https://arxiv.org/pdf/1609.04747.pdf


[14] # Weight Decay

Loshchilov, Ilya, and Frank Hutter. "Decoupled weight decay regularization." arXiv preprint arXiv:1711.05101 (2017).

https://arxiv.org/pdf/1711.05101.pdf

-----

AlexNet(二):Overview

AlexNet(二):Overview

2020/12/28

-----


https://pixabay.com/zh/photos/alexanderplatz-berlin-alex-tv-tower-1222650/

-----

◎ Abstract

-----

◎ Introduction

-----

本論文要解決(它之前研究)的(哪些)問題(弱點)? 

-----


# LeNet 1998。

說明:

LeNet 使用的資料集 MNIST,圖片大小是 28 x 28,訓練集數目為 20K,測試集數目為 10K。類別數目為 10。

https://scidm.nchc.org.tw/dataset/mnist

ILSVRC 使用 ImageNet 的子集,在 1000 個類別中的每個類別中大約包含 1000 張圖像。 總共大約有 120 萬張訓練圖像,50,000 張驗證圖像和 150,000 張測試圖像。(論文資料)。

從 LeNet 到 AlexNet,網路大小變大,各種技巧也增加很多。

-----


# PreVGGNet 2011。

說明:

使用 GPU。小型資料集。加寬無效,加深有效。

-----

◎ Method

-----

解決方法? 

-----


# AlexNet。

說明:

參考具體細節。

-----

具體細節?

https://hemingwang.blogspot.com/2020/12/illustrated-alexnet.html

-----

◎ Result

-----

本論文成果。 

-----

◎ Discussion

-----

本論文與其他論文(成果或方法)的比較。 

-----

成果比較。 

-----

# 2010

說明:

可以看到效果比之前最好的結果好很多。

-----


# 2012

說明:

在多個類似模型的平均,以及整個 ImageNet 2011 Fall 預訓練,都有些微的改善。

-----

方法比較。 

-----

◎ Conclusion 

-----

◎ Future Work

-----

後續相關領域的研究。 

-----


# ZFNet 2013。

說明:

參數的微調,結果稍微改善。

-----

後續延伸領域的研究。

-----


# AlphaGo 2016。

說明:

搭配強化學習,在圍棋的人工智慧上取得極大突破,乃至戰勝職業棋手。

-----

◎ References

-----

# LeNet。被引用 31707 次。經典的卷積神經網路,主要比 HDR 多了全連接層。

LeCun, Yann, et al. "Gradient-based learning applied to document recognition." Proceedings of the IEEE 86.11 (1998): 2278-2324.

http://yann.lecun.com/exdb/publis/pdf/lecun-01a.pdf


# PreVGGNet

Cireşan, Dan C., et al. "High-performance neural networks for visual object classification." arXiv preprint arXiv:1102.0183 (2011).

https://arxiv.org/pdf/1102.0183.pdf


# AlexNet。被引用 74398 次。較早使用 GPU 的大型卷積神經網路之一,效能比之前有飛躍的提升,成功使用 dropout 避免 overfitting。

Krizhevsky, Alex, Ilya Sutskever, and Geoffrey E. Hinton. "Imagenet classification with deep convolutional neural networks." Advances in neural information processing systems 25 (2012): 1097-1105.

https://proceedings.neurips.cc/paper/2012/file/c399862d3b9d6b76c8436e924a68c45b-Paper.pdf


# ZFNet

Zeiler, Matthew D., and Rob Fergus. "Visualizing and understanding convolutional networks." European conference on computer vision. Springer, Cham, 2014.

https://cdanfort.w3.uvm.edu/csc-reading-group/zeiler-eccv-2014.pdf


# AlphaGo

Silver, David, et al. "Mastering the game of Go with deep neural networks and tree search." nature 529.7587 (2016): 484-489.

https://web.iitd.ac.in/~sumeet/Silver16.pdf

-----

AlexNet(一):Paper Translation

 AlexNet(一):Paper Translation

2021/03/06

-----

ImageNet Classification with Deep Convolutional Neural Networks

深度卷積神經網路的 ImageNet 分類

-----


https://pixabay.com/zh/photos/berlin-alexanderplatz-world-clock-4759124/

-----

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 overfitting in the fully-connected layers we employed a recently-developed regularization 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 個不同的類別。在測試數據上,我們的 top-1 和 top-5 錯誤率分別為 37.5% 和 17.0%,比之前的最佳技術要好得多。此神經網路有 6,000 萬個參數和 650,000 個神經元,它由五個卷積層組成,其中一些後面跟著 max-pooling 層,之後再到三個全連接層,最後是輸出為 1000 類別的 softmax。為了使訓練更快,我們使用了非飽和神經元和卷積運算非常高效的 GPU 實現。為了減少全連接層的過度擬合,我們採用了一種新近開發的正則化方法,稱為“丟包”,這種方法被證明很有效。我們還在 ILSVRC-2012 競賽中使用了該模型的一種變體,並獲得了最高的 top-5 測試錯誤率 15.3%,而第二名只有 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 overfitting. 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] 和 ImageNet [6],LabelMe [23] 由成千上萬個完全分割的圖像組成,ImageNet 由超過 1500 萬個帶標籤的高解析圖像組成,於 22,000 多個類別中。

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, stationarity of statistics and locality of pixel dependencies). Thus, compared to standard feedforward 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 overfitting.

儘管 CNN 具有吸引人的品質,且儘管其局部架構相對有效,但將它們大規模應用於高解析圖像仍然非常昂貴。 幸運的是,當前的 GPU 與 2D 卷積的高度優化實現相結合,具有足夠的功能來促進訓練大到夠吸引人的 CNN,而最近的數據集(如 ImageNet)包含足夠的帶標籤範例,可以在不嚴重擬合的情況下訓練此類模型。

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。 我們所有的實驗都表明,只要有更快的 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 萬張帶標籤的高解析圖像的資料集,這些圖像大約有 22,000 個類別。 圖像從網上收集,並由人工貼標籤者使用亞馬遜的 Mechanical Turk 眾包工具貼上標籤。 從 2010 年開始,作為 Pascal 視覺物件挑戰賽的一部分,每年舉行一次名為 ImageNet 大規模視覺識別挑戰賽(ILSVRC)的競賽。 ILSVRC 使用 ImageNet 的子集,在 1000 個類別中的每個類別中大約包含 1000 張圖像。 總共大約有 120 萬張訓練圖像,50,000 張驗證圖像和 150,000 張測試圖像。

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 和t op-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  256. Given a rectangular image, we first rescaled the image such that the shorter side was of length 256, and then cropped out the central 256256 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 由可變解析度的圖像組成,而我們的系統需要恆定的輸入維數。 因此,我們將圖像下採樣到 256X256的 固定解析度。給定矩形圖像,我們首先對圖像進行縮放,以使較短的一邊的長度為 256,然後從結果的圖像中裁剪出中心 256X256 色塊。 除了從每個像素中減去訓練集上的平均值以外,我們沒有以其他任何方式對圖像進行預處理。 因此,我們在像素的(居中)原始 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 總結了我們網路的架構。它包含 8 個學習層 - 5 個卷積層和 3 個全連接層。 下面,我們描述網路架構的一些新穎或少見的功能。 根據我們對它們的重要性的評估,對第 3.1 - 3.4 節進行了排序,最重要的是第一個。

-----

3.1 ReLU Nonlinearity

3.1 ReLU 非線性

The standard way to model a neuron’s output f as a function of its input x is with f(x) = tanh(x) or f(x) = (1 + e^-x)^-1. In terms of training time with gradient descent, these saturating nonlinearities are much slower than the non-saturating nonlinearity f(x) = max(0; x). Following Nair and Hinton [20], we refer to neurons with this nonlinearity 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.

根據輸入 x 來模擬神經元輸出 f 的標準方法是f(x)= tanh(x)或 f(x)=(1 + e ^ -x)^-1。 就梯度下降的訓練時間而言,這些飽和非線性要比非飽和非線性f(x)= max(0; x)慢得多。 繼 Nair 和 Hinton  [20] 之後,我們將具有這種非線性的神經元稱為整流線性單位(ReLUs)。 帶有 ReLU的 深度卷積神經網路的訓練速度比同等的 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 nonlinearity f(x) = |tanh(x)| 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 overfitting, 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)= | tanh(x)| 在對比技術歸一化類型上非常有效,然後在 Caltech-101 資料集上進行局部平均池化。 但是,在此資料集上,主要的問題是防止過度擬合,因此他們觀察到的效果與使用 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 parallelization, as they are able to read from and write to one another’s memory directly, without going through host machine memory. The parallelization 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 平行化,因為它們能夠直接讀取和寫入彼此的內存,而無需通過主機內存。實際上,我們採用的平行化方案將每個內核的一半(或神經元)放在每個 GPU 上,還有一個額外的技巧:GPU 僅在某些層進行通信。這意味著,例如,第 3 層的內核從第 2 層的所有內核映射中獲取輸入。但是,第 4 層的內核僅從第 3 層中駐留在同一 GPU 上的那些內核映射中獲取輸入。選擇連接模式是交叉驗證的一個問題,但這使我們可以精確地調整通信量,直到它是計算量的可接受的一部分為止。

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 net 2.

最終的架構與 Ciresan 等人使用的 “ columnar” CNN 的架構有些相似  [5],只是我們的列不是獨立的(請參見圖2)。 與在一個 GPU 上訓練的每個卷積層中內核數量減少一半的網路相比,該方案分別將我們的 top-1 和 top-5 錯誤率降低了 1.7% 和 1.2%。 兩 GPU 的網路的訓練時間比單 GPU 網路少一點點 2。

2 The one-GPU net actually has the same number of kernels as the two-GPU net in the final convolutional layer. This is because most of the net’s parameters are in the first fully-connected layer, which takes the last convolutional layer as input. So to make the two nets have approximately the same number of parameters, we did not halve the size of the final convolutional layer (nor the fully-conneced layers which follow). Therefore this comparison is biased in favor of the one-GPU net, since it is bigger than “half the size” of the two-GPU net.

2 在最後的卷積層中,一個 GPU 網路實際上具有與兩個 GPU 網路相同的內核數量。 這是因為大多數網路參數位於第一個完全連接的層中,該層將最後一個卷積層作為輸入。 因此,為了使兩個網路具有大約相同數量的參數,我們沒有將最終卷積層的大小減半(也沒有將隨後的全連接層的大小減半)。 因此,此比較偏向於一個 GPU 網路,因為它大於兩個 GPU 網路的“一半大小”。

-----

3.3 Local Response Normalization

3.3 局部響應規範化

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 ai x;y the activity of a neuron computed by applying kernel i at position (x; y) and then applying the ReLU nonlinearity, the response-normalized activity bi x;y is given by the expression

ReLU 有理想的特性,即它們不需要將輸入規範化即可防止飽和。 如果至少一些訓練樣本對 ReLU 產生了正值的輸入,那麼該神經元就會進行學習。 但是,我們仍然發現以下局部歸一化方案有助於泛化。 用ai x; y表示神經元的活動,該活動是通過在位置(x; y)處應用核 i,然後應用 ReLU 非線性計算得到的,響應歸一化活動 bi x; y由以下表達式給出

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; , and are hyper-parameters whose values are determined using a validation set; we used k = 2, n = 5,  α = 10^(-4), and β = 0:75. We applied this normalization after applying the ReLU nonlinearity in certain layers (see Section 3.5).

其中,總和在相同的空間位置上遍歷 n 個“相鄰”內核映射,而 N 是該層中內核的總數。 內核映射的順序當然是任意的,並且在訓練開始之前確定。 這種響應歸一化實現了一種由實際神經元中發現的類型激發的橫向抑制形式,從而在使用不同核計算的神經元輸出中競爭大型活動。 常數 k; n; ,並且是使用驗證集確定其值的超參數; 我們使用 k = 2,n = 5,α = 10 ^(-4),β = 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 和t op-5 錯誤率分別降低了 1.4% 和 1.2%。 我們還在 CIFAR-10 數據集上驗證了該方案的有效性:四層 CNN 在未進行標準化的情況下實現了 13% 的測試錯誤率,在進行標準化的情況下實現了 11% 的測試錯誤率 3。

3 We cannot describe this network in detail due to space constraints, but it is specified precisely by the code and parameter files provided here: http://code.google.com/p/cuda-convnet/.

3 由於篇幅所限,我們無法詳細描述此網路,但是它是由此處提供的代碼和參數文件精確指定的:http://code.google.com/p/cuda-convnet/。

-----

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 x 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 x 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 fully-connected. 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 multinomial 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 所示,該網包含 8 個帶權重的層;每個層都包含權重。 前五個是卷積的,其餘三個是全連接的。 最後一個完全連接層的輸出被饋送到 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 fully-connected 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 x 224 x 3 input image with 96 kernels of size 11 x 11 x 3 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 x 5 x 48. 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 x 3 x 256 connected to the (normalized, pooled) outputs of the second convolutional layer. The fourth convolutional layer has 384 kernels of size 3 x 3 x 192 , and the fifth convolutional layer has 256 kernels of size 3 x 3 x 192. The fully-connected layers have 4096 neurons each.

第一卷積層過濾 224 x 224 x 3 輸入圖像,具有 96 個大小為 11 x 11 x 3 的內核,步幅為 4 像素(這是內核圖中相鄰神經元的感受野中心之間的距離 )。 第二個卷積層將第一個卷積層的(響應歸一化和合併的)輸出作為輸入,並使用大小為 5 x 5 x 48 的 256 個內核對其進行過濾。第三,第四和第五個卷積層連接到一個 另一個沒有任何中間池或規範化層。 第三卷積層具有 384 個大小為 3 x 3 x 256 的內核,這些內核連接到第二卷積層的(標準化,合併的)輸出。 第四卷積層具有 384 個 3 x 3 x 192 大小的內核,第五卷積層具有 256 個 3 x 3 x 192 大小的內核。全連接層每個都有 4096 個神經元。

-----

4 Reducing Overfitting

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 overfitting. Below, we describe the two primary ways in which we combat overfitting.

我們的神經網路架構具有 6000 萬個參數。 儘管 ILSVRC 的 1000 個類別使每個訓練樣本在從圖像到標籤的映射上施加 10 位元約束,但事實證明這不足以學習太多參數而又不會出現過度擬合的情況。 下面,我們描述了克服過度擬合的兩種主要方法。

4.1 Data Augmentation

4.1 資料擴充

The easiest and most common method to reduce overfitting 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])人為地放大資料集。 我們採用兩種不同的資料擴充形式,這兩種形式都允許通過很少的計算就可以從原始圖像生成轉換後的圖像,因此不需要將轉換後的圖像存儲在磁碟上。 在我們的實現中,當 GPU 訓練上一批圖像時,轉換後的圖像在 CPU 上以 Python 代碼生成。 因此,這些資料擴充方案實際上在計算上是免費的。

The first form of data augmentation consists of generating image translations and horizontal reflections. We do this by extracting random 224 x 224 patches (and their horizontal reflections) from the 256 x 256 images and training our network on these extracted patches 4. 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 overfitting, which would have forced us to use much smaller networks. At test time, the network makes a prediction by extracting five 224 x 224 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 x 256 張圖像中提取了 224 x 224 個隨機色塊(及其水平反射),並用這些提取的色塊訓練我們的網路 4。這當然使我們的訓練集大小增加了 2048 倍,儘管生成的訓練樣本當然是高度相關的。 沒有這種方案,我們的網路會嚴重過度擬合,這將迫使我們使用較小的網路。 在測試時,網路通過提取五個 224 x 224 色塊(四個角點和中央色塊)及其水平反射(因此總共有十個色塊)進行預測,並平均網路的 softmax 做出的預測十個補丁上的圖層。

4 這就是為什麼圖2 中的輸入圖像為 224 x 224 x 3維的原因。

4 This is the reason why the input images in Figure 2 are 224 x 224 x 3-dimensional.

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 RGB image pixel Ixy = [IR xy; IG xy; IB xy]T we add the following quantity:

資料增強的第二種形式包括更改訓練圖像中 RGB 通道的強度。 具體來說,我們在整個 ImageNet 訓練集中對 RGB 像素值集執行 PCA。 對於每個訓練圖像,我們添加找到的主成分的倍數,其大小與相應的特徵值乘以從均值為零且標準偏差為 0.1 的高斯得出的隨機變量成比例。 因此,對於每個 RGB 圖像像素,Ixy = [IR xy; IG xy; IB xy] T,我們添加以下數量:

where pi and λi are ith eigenvector and eigenvalue of the 3 x 3 covariance matrix of RGB pixel values, respectively, and α i is the aforementioned random variable. Each αi is drawn only once for all the pixels of a particular training image until that image is used for training again, at which point it is re-drawn. This scheme approximately captures an important property of natural images, namely, that object identity is invariant to changes in the intensity and color of the illumination. This scheme reduces the top-1 error rate by over 1%.

其中,pi 和 λi 分別是 RGB 像素值的 3 x 3 協方差矩陣的第 i 個特徵向量和特徵值,而 αi 是上述隨機變量。 對於特定訓練圖像的所有像素,每個 αi 僅繪製一次,直到再次使用該圖像進行訓練為止,此時將其重新繪製。 該方案近似地捕獲了自然圖像的重要性質,即,對象身份對於明暗的強度和顏色的變化是不變的。 此方案將 top-1 錯誤率降低了 1% 以上。

-----

4.2 Dropout

4.2 Dropout

Combining the predictions of many different models is a very successful way to reduce test errors [1, 3], but it appears to be too expensive for big neural networks that already take several days to train. There is, however, a very efficient version of model combination that only costs about a factor of two during training. The recently-introduced technique, called “dropout” [10], consists of setting to zero the output of each hidden neuron with probability 0.5. The neurons which are “dropped out” in this way do not contribute to the forward pass and do not participate in backpropagation. So every time an input is presented, the neural network samples a different architecture, but all these architectures share weights.  This technique reduces complex co-adaptations of neurons, since a neuron cannot rely on the presence of particular other neurons. It is, therefore, forced to learn more robust features that are useful in conjunction with many different random subsets of the other neurons. At test time, we use all the neurons but multiply their outputs by 0.5, which is a reasonable approximation to taking the geometric mean of the predictive distributions produced by the exponentially-many dropout networks.

結合許多不同模型的預測是減少測試錯誤的非常成功的方法[ 1,3],但是對於已經花了幾天時間進行訓練的大型神經網路來說,這似乎太昂貴了。 但是,有一個非常有效的模型組合版本,在訓練過程中僅花費約 2 倍的成本。 最近引入的技術稱為“dropout” [10],包括將每個隱藏神經元的輸出以 0.5 的概率設置為零。 以這種方式“退出”的神經元不會對正向做出貢獻,也不會參與反向傳播。 因此,每次出現輸入時,神經網路都會對不同的體系結構進行採樣,但是所有這些體系結構都會共享權重。由於神經元不能依賴於特定其他神經元的存在,因此該技術減少了神經元的複雜共適應。 因此,被迫學習更穩健的功能,這些功能可與其他神經元的許多不同隨機子集結合使用。 在測試時,我們使用所有神經元,但將它們的輸出乘以 0.5,這是採用指數上的多個 dropout 網路產生的預測分佈的幾何平均值的合理近似值。

We use dropout in the first two fully-connected layers of Figure 2. Without dropout, our network exhibits substantial overfitting. Dropout roughly doubles the number of iterations required to converge.

我們在圖2 的前兩個全連接層中使用了dropout。如果沒有 dropout,我們的網路將表現出過大的過擬合。 Dropout 大約會使收斂所需的迭代次數增加一倍。

-----

5 Details of learning

5 學習的細節

We trained our models using stochastic gradient descent with a batch size of 128 examples, momentum of 0.9, and weight decay of 0.0005. We found that this small amount of weight decay was important for the model to learn. In other words, weight decay here is not merely a regularizer: it reduces the model’s training error. The update rule for weight w was

我們使用隨機梯度下降訓練了模型,批次大小為 128 個樣本,動量為0.9,權重衰減為 0.0005。 我們發現,少量的權重衰減對於模型的學習很重要。 換句話說,這裡的權重衰減不僅僅是一個正則化器:它可以減少模型的訓練誤差。 權重 w 的更新規則為

We initialized the weights in each layer from a zero-mean Gaussian distribution with standard deviation 0.01. We initialized the neuron biases in the second, fourth, and fifth convolutional layers, as well as in the fully-connected hidden layers, with the constant 1. This initialization accelerates the early stages of learning by providing the ReLUs with positive inputs. We initialized the neuron biases in the remaining layers with the constant 0.

我們從零均值高斯分佈(標準差為 0.01)初始化每一層的權重。 我們使用常數 1 初始化了第二,第四和第五卷積層以及完全連接的隱藏層中的神經元偏差。此初始化通過為 ReLU 提供正輸入來加速學習的早期階段。 我們用常數 0 初始化其餘層中的神經元偏差。

We used an equal learning rate for all layers, which we adjusted manually throughout training. The heuristic which we followed was to divide the learning rate by 10 when the validation error rate stopped improving with the current learning rate. The learning rate was initialized at 0.01 and reduced three times prior to termination. We trained the network for roughly 90 cycles through the training set of 1.2 million images, which took five to six days on two NVIDIA GTX 580 3GB GPUs.

我們對所有層使用了相等的學習率,我們在整個訓練過程中手動對其進行了調整。 我們遵循的啟發式方法是,當驗證錯誤率不再隨著當前學習率提高而提高時,將學習率除以 10。 將學習率初始化為 0.01,並在終止之前降低三倍。 我們通過 120 萬張圖像的訓練集對網路進行了大約 90 個週期的訓練,在兩個 NVIDIA GTX 580 3GB GPU上花了五到六天的時間。

-----

6 Results

6 結果

Our results on ILSVRC-2010 are summarized in Table 1. Our network achieves top-1 and top-5 test set error rates of 37.5% and 17.0%5. The best performance achieved during the ILSVRC-2010 competition was 47.1% and 28.2% with an approach that averages the predictions produced from six sparse-coding models trained on different features [2], and since then the best published results are 45.7% and 25.7% with an approach that averages the predictions of two classifiers trained on Fisher Vectors (FVs) computed from two types of densely-sampled features [24].

表1 總結了我們在 ILSVRC-2010 上的結果。我們的網路實現了 top-1 和 top-5 測試集錯誤率分別為 37.5% 和 17.0% 5。 在 ILSVRC-2010 競賽中獲得的最佳性能分別為 47.1% 和 28.2%,其方法是對根據不同特徵訓練的六個稀疏編碼模型產生的預測取平均值 [2],此後,最佳的公開結果是 45.7% 和 25.7% 的方法,對兩個分類器的預測值進行平均,該分類器是根據兩種類型的密集採樣特徵計算的,在 Fisher 向量(FV)上訓練的 [24]。

5 The error rates without averaging predictions over ten patches as described in Section 4.1 are 39.0% and 18.3%.

5 如第 4.1 節所述,未對十個補丁進行平均預測的錯誤率分別為 39.0% 和 18.3%。

We also entered our model in the ILSVRC-2012 competition and report our results in Table 2. Since the ILSVRC-2012 test set labels are not publicly available, we cannot report test error rates for all the models that we tried. In the remainder of this paragraph, we use validation and test error rates interchangeably because in our experience they do not differ by more than 0.1% (see Table 2). The CNN described in this paper achieves a top-5 error rate of 18.2%. Averaging the predictions of five similar CNNs gives an error rate of 16.4%. Training one CNN, with an extra sixth convolutional layer over the last pooling layer, to classify the entire ImageNet Fall 2011 release (15M images, 22K categories), and then “fine-tuning” it on ILSVRC-2012 gives an error rate of 16.6%. Averaging the predictions of two CNNs that were pre-trained on the entire Fall 2011 release with the aforementioned five CNNs gives an error rate of 15.3%. The second-best contest entry achieved an error rate of 26.2% with an approach that averages the predictions of several classifiers trained on FVs computed from different types of densely-sampled features [7].

我們也將模型輸入了 ILSVRC-2012 競賽,並在表2 中報告了結果。由於 ILSVRC-2012 測試集標籤不是公開可用的,因此我們無法報告所有嘗試過的模型的測試錯誤率。 在本段的其餘部分,我們將驗證和測試錯誤率互換使用,因為根據我們的經驗,它們的相差不超過 0.1%(請參見表2)。 本文所述的 CNN 的 top-5 錯誤率達到了 18.2%。 平均五個相似 CNN 的預測得出的錯誤率為 16.4%。訓練一個 CNN,在最後一個池化層上再加上一個第六卷積層,以對整個 ImageNet Fall 2011版本(1500萬張圖像,22K 個類別)進行分類,然後在 ILSVRC-2012 上對其進行“微調”,得出的錯誤率為 16.6 %。 將在整個 2011 年秋季版本中經過預訓練的兩個 CNN 與上述五個 CNN 的預測平均得出錯誤率 15.3%。 次優競賽條目的錯誤率達到 26.2%,該方法對從不同類型的密集採樣特徵計算出的 FV 訓練的幾個分類器的預測取平均值 [7]。

Finally, we also report our error rates on the Fall 2009 version of ImageNet with 10,184 categories and 8.9 million images. On this dataset we follow the convention in the literature of using half of the images for training and half for testing. Since there is no established test set, our split necessarily differs from the splits used by previous authors, but this does not affect the results appreciably. Our top-1 and top-5 error rates on this dataset are 67.4% and 40.9%, attained by the net described above but with an additional, sixth convolutional layer over the last pooling layer. The best published results on this dataset are 78.1% and 60.9% [19].

最後,我們還報告了 ImageNet 2009 年秋季版本的錯誤率,其中包含 10,184 個類別和 890 萬張圖像。 在此資料集上,我們遵循文獻中的慣例,即使用一半的圖像進行訓練,一半使用圖像進行測試。 由於沒有已建立的測試集,因此我們的劃分必定與以前的作者使用的劃分不同,但這不會對結果產生明顯影響。 通過上述網路,我們在此資料集上的 top-1 和 top-5 錯誤率分別為 67.4% 和 40.9%,但在最後一個池化層上還有一個第六卷積層。 在該資料集上發表的最佳結果分別為 78.1 %和 60.9% [19]。

-----

6.1 Qualitative Evaluations

6.1 定性評估

Figure 3 shows the convolutional kernels learned by the network’s two data-connected layers. The network has learned a variety of frequency- and orientation-selective kernels, as well as various colored blobs. Notice the specialization exhibited by the two GPUs, a result of the restricted connectivity described in Section 3.5. The kernels on GPU 1 are largely color-agnostic, while the kernels on on GPU 2 are largely color-specific. This kind of specialization occurs during every run and is independent of any particular random weight initialization (modulo a renumbering of the GPUs).

圖3 顯示了網路的兩個資料連接層所學習的捲積內核。 網路已經學會了各種頻率和方向選擇內核,以及各種有色斑點。 請注意,這是兩個 GPU 所展現出的特性,這是第 3.5 節中描述的受限連接性的結果。 GPU 1 上的內核在很大程度上與顏色無關,而 GPU 2 上的內核在很大程度上是特定於顏色的。 這種特殊化發生在每次運行期間,並且與任何特定的隨機權重初始化(對GPU進行重新編號的模數)無關。

In the left panel of Figure 4 we qualitatively assess what the network has learned by computing its top-5 predictions on eight test images. Notice that even off-center objects, such as the mite in the top-left, can be recognized by the net. Most of the top-5 labels appear reasonable. For example, only other types of cat are considered plausible labels for the leopard. In some cases (grille, cherry) there is genuine ambiguity about the intended focus of the photograph.

在圖4 的左面板中,我們通過在八幅測試圖像上計算其 top-5 的預測,定性地評估網路學到的知識。 請注意,即使偏心的對象(例如左上角的蟎)也可以被網路識別。 大多數 top-5 標籤看起來都是合理的。 例如,只有其他類型的貓才被視為豹子的合理標籤。 在某些情況下(穀物,櫻桃),對於照片的預期焦點有真正的歧義。

Another way to probe the network’s visual knowledge is to consider the feature activations induced by an image at the last, 4096-dimensional hidden layer. If two images produce feature activation vectors with a small Euclidean separation, we can say that the higher levels of the neural network consider them to be similar. Figure 4 shows five images from the test set and the six images from the training set that are most similar to each of them according to this measure. Notice that at the pixel level, the retrieved training images are generally not close in L2 to the query images in the first column. For example, the retrieved dogs and elephants appear in a variety of poses. We present the results for many more test images in the supplementary material.

探查網路視覺知識的另一種方法是考慮由最後 4096 維隱藏層中的圖像引起的特徵激活。 如果兩個圖像產生的特徵激活向量具有較小的歐幾里得距離,則可以說神經網路的較高級別認為它們是相似的。 圖4 顯示了根據此度量,來自測試集的五幅圖像和來自訓練集的六幅圖像,它們與每個圖像最為相似。 請注意,在像素級別,檢索到的訓練圖像在 L2 中通常不接近第一列中的查詢圖像。 例如,檢索的狗和大象以各種姿勢出現。 我們在補充材料中提供了更多測試圖像的結果。

Computing similarity by using Euclidean distance between two 4096-dimensional, real-valued vectors is inefficient, but it could be made efficient by training an auto-encoder to compress these vectors to short binary codes. This should produce a much better image retrieval method than applying autoencoders to the raw pixels [14], which does not make use of image labels and hence has a tendency to retrieve images with similar patterns of edges, whether or not they are semantically similar.

通過使用兩個 4096 維實值向量之間的歐幾里德距離來計算相似度效率不高,但是可以通過訓練自動編碼器將這些向量壓縮為短二進制代碼來提高相似度。 與將自動編碼器應用於原始像素相比,這應該產生一種更好的圖像檢索方法 [14],該方法不使用圖像標籤,因此有檢索具有相似邊緣模式的圖像的趨勢,而無論它們在語義上是否相似。

-----

7 Discussion

7 討論

Our results show that a large, deep convolutional neural network is capable of achieving recordbreaking results on a highly challenging dataset using purely supervised learning. It is notable that our network’s performance degrades if a single convolutional layer is removed. For example, removing any of the middle layers results in a loss of about 2% for the top-1 performance of the network. So the depth really is important for achieving our results.

我們的結果表明,大型的深層卷積神經網路能夠使用純監督學習在具有高度挑戰性的資料集上實現創紀錄的結果。 值得注意的是,如果移除某個卷積層,我們的網路性能就會下降。 例如,刪除任何中間層都會導致網路的 top-1 性能損失約 2%。 因此深度對於實現我們的結果確實很重要。

To simplify our experiments, we did not use any unsupervised pre-training even though we expect that it will help, especially if we obtain enough computational power to significantly increase the size of the network without obtaining a corresponding increase in the amount of labeled data. Thus far, our results have improved as we have made our network larger and trained it longer but we still have many orders of magnitude to go in order to match the infero-temporal pathway of the human visual system. Ultimately we would like to use very large and deep convolutional nets on video sequences where the temporal structure provides very helpful information that is missing or far less obvious in static images.

為了簡化我們的實驗,我們沒有使用任何無監督的預訓練,即使我們希望這會有所幫助,尤其是如果我們獲得足夠的計算能力來顯著增加網路的大小而又未獲得標記資料量的相應增加時。 到目前為止,由於我們擴大了網路並訓練了更久,我們的結果有所改善,但為了匹配人類視覺系統的下側顳葉路徑,我們還有很長的路要走。 最終,我們希望在視頻序列上使用非常大和較深的卷積網路,其中時間結構提供了非常有用的信息,這些信息在靜態圖像中丟失或不那麼明顯。

-----

# AlexNet。被引用 74398 次。較早使用 GPU 的大型卷積神經網路之一,效能比之前有飛躍的提升,成功使用 dropout 避免 overfitting。

Krizhevsky, Alex, Ilya Sutskever, and Geoffrey E. Hinton. "Imagenet classification with deep convolutional neural networks." Advances in neural information processing systems 25 (2012): 1097-1105.

https://proceedings.neurips.cc/paper/2012/file/c399862d3b9d6b76c8436e924a68c45b-Paper.pdf

-----