一、网络结构
使用2个卷积层,2个池化层, 2个全连接层组成网络
输入→ 卷积→ ReLU→max polling→ 卷积→ ReLU→max polling→ FC→输出
-
输入
一个4维的tensor: [batch_size, image_width, image_height, channels], 分别代表梯度下降处理的批量数据大小,图片宽度,图片高度和图片的channel个数(彩色图片channel数为3[Red, Green, Blue],单色图片channel数为1)
-
卷积层#1:
采用32(channel)个5*5的过滤器(kernel)对原始输入图像做卷积(局部感知), 另外对输入矩阵加了zero padding以保持卷积输出宽高和输入一致,并用ReLU作为激活函数引入非线性特性
-
池化层#1
采用2*2的过滤器(stride=2)对卷积层#1的输出做最大值下采样(max polling), 降低了数据纬度,并避免过拟合