常用數據集:
ImageNet http://www.image-net.org/
Microsoft的COCO http://mscoco.org/
CIFAR-10和CIFAR-100 https://www.cs.toronto.edu/~kriz/cifar.html
PASCAL VOC http://host.robots.ox.ac.uk/pascal/VOC/
模型們在ImageNet競賽上的top-5錯誤率概況:
常用預訓練模型池:
https://github.com/BVLC/caffe/wiki/Model-Zoo
https://github.com/tensorflow/models/tree/master/research/slim#pre-trained-models
AlexNet:
AlexNet 代碼及模型(Caffe) https://github.com/BVLC/caffe/tree/master/models/bvlc_alexnet
微調AlexNet以適應任意數據集(Tensorflow) https://github.com/kratzert/finetune_alexnet_with_tensorflow
AlexNet信息如上圖
- 在當時第一次使用了ReLU
- 使用了Norm層(在當時還不廣泛)
- 訓練數據量增大
- dropout 0.5
- 每批數據大小 128
- 優化方式:隨機梯度下降+Momentum 0.9
- 學習率爲0.01。每次損失到達瓶頸時除以10
- L2 正則 參數爲5e-4
VGG:
VGG-16 官方代碼和ILSVRC模型(Caffe) https://gist.github.com/ksimonyan/211839e770f7b538e2d8
VGG-19 官方代碼和ILSVRC模型(Caffe) https://gist.github.com/ksimonyan/3785162f95cd2d5fee77
Tensorflow版 VGG-16/VGG-19 https://github.com/machrisaa/tensorflow-vgg
VGG是最符合典型CNN的一種網絡,它在AlexNet的基礎上加深了網絡,以達到更好的效果。
(以下引用http://blog.csdn.net/u012767526/article/details/51442367#vggnet分析)
這裏有兩個表格,其中第一個表格是描述的是VGGNet的誕生過程。爲了解決初始化(權重初始化)等問題,VGG採用的是一種Pre-training的方式,這種方式在經典的神經網絡中經常見得到,就是先訓練一部分小網絡,然後再確保這部分網絡穩定之後,再在這基礎上逐漸加深。表1從左到右體現的就是這個過程,並且當網絡處於D階段的時候,效果是最優的,因此D階段的網絡也就是最後的VGGNet啦!
ResNet:
ResNet-50, ResNet-101, and ResNet-152 代碼及ILSVRC/COCO模型(Caffe) https://github.com/KaimingHe/deep-residual-networks
以上模型的Torch版(lua),由Facebook實現 https://github.com/facebook/fb.resnet.torch
ResNet-1001代碼及ILSVRC/COCO模型(Caffe-目前第一名) https://github.com/KaimingHe/resnet-1k-layers
ResNet-1001在CIFAR-10上的表現
mini-batch | CIFAR-10 test error (%): (median (mean+/-std)) |
---|---|
128 (as in [a]) | 4.92 (4.89+/-0.14) |
64 (as in this code) | 4.62 (4.69+/-0.20) |
ResNet原理
正常的網絡是生成一個關於輸入的函數,而ResNet生成的是一個對於輸入的一個修飾:H(x) = F(x)+x。即神經網絡生成的結果還要加上輸入,纔是最終輸出。
訓練參數如上圖:
- 每一個Conv層後面都會有Batch Normalization層。
- 權重初始化方式:Xavier/2
- optimization方式:隨機梯度下降+Momentum(0.9)
- 學習率:0.1,每一次錯誤率達到瓶頸時除以10,直到錯誤率無法再優化爲止。
- Mini-batch(每批訓練數據) 大小爲256
- Weight 衰減1e-5(?)
- 不需要dropout