谷歌系列 :Inception v1到v4
Paper列表:
[v1] Going Deeper with Convolutions, 6.67% test error, http://arxiv.org/abs/1409.4842
[v2] Batch Normalization: Accelerating Deep Network Training by Reducing Internal Covariate Shift, 4.8% test error, http://arxiv.org/abs/1502.03167
[v3] Rethinking the Inception Architecture for Computer Vision, 3.5% test error, http://arxiv.org/abs/1512.00567
[v4] Inception-v4, Inception-ResNet and the Impact of Residual Connections on Learning, 3.08% test error, http://arxiv.org/abs/1602.07261
大體思路:
Inception v1(ILSVRC14):
1、傳統(tǒng)的ConvNet是將Convulution layer stack在一起,而Inception最大的改變就是時(shí)Inception模塊疊加的形式構(gòu)造網(wǎng)絡(luò)。按論文里面說(shuō)就是,用Inception(稠密的可利用的組件)近似一個(gè)稀疏結(jié)構(gòu)。
將1x1,3x3,5x5的conv和3x3的pooling,stack在一起,一方面增加了網(wǎng)絡(luò)的width,另一方面增加了網(wǎng)絡(luò)對(duì)尺度的適應(yīng)性.
主要特點(diǎn)是提高了網(wǎng)絡(luò)內(nèi)部計(jì)算資源的利用率。
結(jié)構(gòu)如下圖:
2、作者以Inception為基本構(gòu)造塊構(gòu)造成了GoogLenet。GoogLenet有兩個(gè)主要特點(diǎn):
(1)在低層時(shí)候仍然用傳統(tǒng)的方式,高層用Inception塊疊加。(論文中說(shuō)這可能反應(yīng)了當(dāng)前構(gòu)造的不足)
(2)用Average pooling 替換傳統(tǒng)的FC
(3)為了解決梯度彌散的問(wèn)題,在4a 和4d的后面添加輔助loss,該loss僅在訓(xùn)練的時(shí)候以一定的weight參與梯度傳遞,而在test的時(shí)候不用。
網(wǎng)絡(luò)結(jié)構(gòu):
3、論文總結(jié)的或許導(dǎo)致實(shí)驗(yàn)效果好的一些因素
訓(xùn)練時(shí)
訓(xùn)練了7個(gè)模型,為了使問(wèn)題更精細(xì),一些模型在較小的crop上訓(xùn)練,一些模型則在大的crop上訓(xùn)練。
使模型訓(xùn)練較好的因素包括:
(1)圖像各種尺寸patch的采樣,這些patch 的size平均分布在圖像區(qū)域的8%到100%間,長(zhǎng)寬比例在3/4和4/3間。
(2)[8]的光照變化對(duì)于對(duì)抗過(guò)擬合有用。
(3)在后期使用隨機(jī)差值進(jìn)行圖像的resize
測(cè)試時(shí)
1、訓(xùn)練7個(gè)相同的模型,其中包括一個(gè)較寬的版本,并且對(duì)結(jié)果進(jìn)行集成。這些模型用相同的初始化和學(xué)習(xí)率測(cè)量,不同的是采樣的方法不同和輸入圖像的順序不同。
2、測(cè)試時(shí)更暴力的crop。
把圖像resize成4個(gè)不同的尺度,使的短邊分別是256,288,320和352.從這些resize后的圖像中取左中右的方塊。對(duì)每一個(gè)方塊,取4個(gè)角落,中間的224*224crops,以及整個(gè)方塊的224*224的resize,同時(shí)對(duì)這patch鏡像。這樣每個(gè)圖像提取出的patch數(shù)是:4*3*6*2=224.
然而,似乎這種crop不是必須的。
3.softmax概率在多個(gè)crops和所有分類(lèi)器上進(jìn)行平均,獲得最終的預(yù)測(cè)
paper1
Inception-v2:
第4個(gè)版本把這個(gè)版本稱(chēng)為Inception-v2,但是看到在作者的第三篇paper里面稱(chēng)這個(gè)版本為BN-inception.
在v1的基礎(chǔ)上,進(jìn)行了改進(jìn),一方面了加入了BN層,減少了Internal Covariate Shift(內(nèi)部neuron的數(shù)據(jù)分布發(fā)生變化),使每一層的輸出都規(guī)范化到一個(gè)N(0, 1)的高斯,另外一方面學(xué)習(xí)VGG用2個(gè)3x3的conv替代inception模塊中的5x5,既降低了參數(shù)數(shù)量,也加速計(jì)算;
論文閱讀:happynear 的博客
網(wǎng)絡(luò)結(jié)構(gòu):
Figure 5 documents the changes that were performed compared to the architecture with respect to the GoogleNet archictecture. For the interpretation of this table, please consult (Szegedy et al., 2014). The notable architecture changes compared to the GoogLeNet model include:
? The 5×5 convolutional layers are replaced by two consecutive 3×3 convolutional layers. This increases the maximum depth of the network by 9 weight layers. Also it increases the number of parameters by 25% and the computational cost is increased by about 30%.
? The number 28×28 inception modules is increased from 2 to 3.
? Inside the modules, sometimes average, sometimes maximum-pooling is employed. This is indicated in the entries crresponding to the pooling layers of the table.
? There are no across the board pooling layers between any two Inception modules, but stride-2 convolution/pooling layers are employed before the filter concatenation in the modules 3c, 4e.
Our model employed separable convolution with depth multiplier 8 on the first convolutional layer. This reduces the computational cost while increasing the memory consumption at training time.(不明白)
Inception-v3:
(1)7*7的卷積層替換成了3個(gè)3*3的卷積
(2)第一塊Inception變成了3個(gè)(同BN-Inception)
(3)第一塊Inception是傳統(tǒng)的
第二塊Inception是 Fig.5. 5*5替換成兩個(gè)3*3
第三塊Inception是Fig.6. 1*n 和n*1
v3一個(gè)最重要的改進(jìn)是分解(Factorization),將7x7分解成兩個(gè)一維的卷積(1x7,7x1),3x3也是一樣(1x3,3x1),這第一個(gè)樣的好處,既可以加速計(jì)算(多余的計(jì)算能力可以用來(lái)加深網(wǎng)絡(luò)),又可以將1個(gè)conv拆成2個(gè)conv,使得網(wǎng)絡(luò)深度進(jìn)一步增加,增加了網(wǎng)絡(luò)的非線性,還有值得注意的地方是網(wǎng)絡(luò)輸入從224x224變?yōu)榱?99x299,更加精細(xì)設(shè)計(jì)了35x35/17x17/8x8的模塊;
具體來(lái)講:
訓(xùn)練的技巧增加了:
上圖增加的內(nèi)容是累加的,最后一個(gè)就是Inception v3.
(1)RMSProp: 一種參數(shù)優(yōu)化的方式
在caffe中,solver里面定義:
solver_type:RMSProp
關(guān)于solver_type,caffe一共提供六種:
Stochastic Gradient Descent (type: “SGD”),
AdaDelta (type: “AdaDelta”),
Adaptive Gradient (type: “AdaGrad”),
Adam (type: “Adam”),
Nesterov’s Accelerated Gradient (type: “Nesterov”) and
RMSprop (type: “RMSProp”)
詳見(jiàn):
http://www.cnblogs.com/denny402/p/5074212.html
(2)label smoothing
(3)Factorized 7*7
把第一個(gè)7*7的卷積層替換成了3個(gè)3*3的卷積(可是,前面定義的Inception-v2里面已經(jīng)有了。。。。)
(4)BN-auxiliary:在輔助層的全連接層后面也進(jìn)行BN操作。
Inception-v4 Inception-ResNet v1 Inception-ResNet v2:
研究了Inception模塊結(jié)合Residual Connection能不能有改進(jìn)?發(fā)現(xiàn)ResNet的結(jié)構(gòu)可以極大地加速訓(xùn)練,同時(shí)性能也有提升,得到一個(gè)Inception-ResNet v2網(wǎng)絡(luò),同時(shí)還設(shè)計(jì)了一個(gè)更深更優(yōu)化的Inception v4模型,能達(dá)到與Inception-ResNet v2相媲美的性能。
總結(jié)
以上是生活随笔為你收集整理的谷歌系列 :Inception v1到v4的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: clip\_gradient
- 下一篇: Person Re-Identificat