用tensorflow手动实现VGG16
1简介
VGG卷积神经网络是牛津大学在2014年提出来的模型。当这个模型被提出时,由于它的简洁性和实用性,马上成为了当时最流行的卷积神经网络模型。它在图像分类和目标检测任务中都表现出非常好的结果。在2014年的ILSVRC比赛中,VGG 在Top-5中取得了92.3%的正确率。
2结构图
我们将其结构拆解开:具体每步过程如下
表4.5 VGG16网络参数配置
网络层 | 输入尺寸 | 核尺寸 | 输出尺寸 | 参数个数 |
---|---|---|---|---|
卷积层 C 11 C_{11} C11 | 224 × 224 × 3 224\times224\times3 224×224×3 | 3 × 3 × 64 / 1 3\times3\times64/1 3×3×64/1 | 224 × 224 × 64 224\times224\times64 224×224×64 | ( 3 × 3 × 3 + 1 ) × 64 (3\times3\times3+1)\times64 (3×3×3+1)×64 |
卷积层 C 12 C_{12} C12 | 224 × 224 × 64 224\times224\times64 224×224×64 | 3 × 3 × 64 / 1 3\times3\times64/1 3×3×64/1 | 224 × 224 × 64 224\times224\times64 224×224×64 | ( 3 × 3 × 64 + 1 ) × 64 (3\times3\times64+1)\times64 (3×3×64+1)×64 |
下采样层 S m a x 1 S_{max1} Smax1 | 224 × 224 × 64 224\times224\times64 224×224×64 | 2 × 2 / 2 2\times2/2 2×2/2 | 112 × 112 × 64 112\times112\times64 112×112×64 | 0 0 0 |
卷积层 C 21 C_{21} C21 | 112 × 112 × 64 112\times112\times64 112×112×64 | 3 × 3 × 128 / 1 3\times3\times128/1 3×3×128/1 | 112 × 112 × 128 112\times112\times128 112×112×128 | ( 3 × 3 × 64 + 1 ) × 128 (3\times3\times64+1)\times128 (3×3×64+1)×128 |
卷积层 C 22 C_{22} C22 | 112 × 112 × 128 112\times112\times128 112×112×128 | 3 × |