AlexNet详解
使用Dropout的方式在网络正向传播过程中随机失活一部分神经元,以减少过拟合
经卷积后的矩阵尺寸大小计算公式为:
N = ( W - F + 2P ) / S + 1
①输入图片大小为 W×W
②Filter大小 F×F
③步长S
④ padding的像素数P
Conv1
注意:原作者实验时用了两块GPU并行计算,上下两组图的结构是一样的。
输入:input_size = [224, 224, 3]
卷积层:
kernels = 48 * 2 = 96 组卷积核
kernel_size = 11
padding = [1, 2] (左上围加半圈0,右下围加2倍的半圈0)
stride = 4
输出:output_size = [55, 55, 96]
经 Conv1 卷积后的输出层尺寸为:
Output = ( W − F + 2 P )/ S + 1 = [ 224 − 11 + ( 1 + 2 ) ] / 4 + 1 = 55
Maxpool1
输入:input_size = [55, 55, 96]
池化层:(只改变尺寸,不改变深度channel)
kernel_size = 3
padding = 0
stride = 2
输出:output_size = [27, 27, 96]
经 Maxpool1 后的输出层尺寸为:
O u t p u t = ( W − F + 2 P ) / S + 1 = ( 55 − 3 ) / 2 + 1 = 27
Conv2
输入:input_size = [27, 27, 96]
卷积层:
kernels = 128 * 2 = 256 组卷积核
kernel_size = 5
padding = [2, 2]
stride = 1
输出:output_size = [27, 27, 256]
经 Conv2 卷积后的输出层尺寸为:
O u t p u t = ( W − F + 2 P ) / S + 1 = [ 27 − 5 + ( 2 + 2 ) ] 1 + 1 = 27
Maxpool2
输入:input_size = [27, 27, 256]
池化层:(只改变尺寸,不改变深度channel)
kernel_size = 3
padding = 0
stride = 2
输出:output_size = [13, 13, 256]
经 Maxpool2 后的输出层尺寸为:
O u t p u t = ( W − F + 2 P ) / S + 1 = ( 27 − 3 ) / 2 + 1 = 13
Conv3
输入:input_size = [13, 13, 256]
卷积层:
kernels = 192* 2 = 384 组卷积核
kernel_size = 3
padding = [1, 1]
stride = 1
输出:output_size = [13, 13, 384]
经 Conv3 卷积后的输出层尺寸为:
O u t p u t = ( W − F + 2 P ) / S + 1 = [ 13 − 3 + ( 1 + 1 ) ] / 1 + 1 = 13
Conv4
输入:input_size = [13, 13, 384]
卷积层:
kernels = 192* 2 = 384 组卷积核
kernel_size = 3
padding = [1, 1]
stride = 1
输出:output_size = [13, 13, 384]
经 Conv4 卷积后的输出层尺寸为:
O u t p u t = ( W − F + 2 P ) / S + 1 = [ 13 − 3 + ( 1 + 1 ) ] /1 + 1 = 13
Conv5
输入:input_size = [13, 13