1.卷积后尺寸计算
out_height=(in_height+2padding-filter_height)/strides[1]+1
out_width=(in_width+2padding-filter_width)/strides[2] +1
2.TensorFlow中卷积参数same和valid运算之后的维度计算
(1)‘SAME’
out_height=ceil(float(in_height))/float(strides[1])
out_width=ceil(float(in_width))/float(strides[2])
(2)‘VALID’
out_height=ceil(float(in_height-filter_height+1))/float(strides[1])
out_width=ceil(float(in_width-filter_width+1))/float(strides[2])
(3)参数
padding: SAME和VALID两种形式
filter: [5,5,1,32]表示5*5的卷积核,1个channel,32个卷积核;
strides: [1,4,4,1]表示横向和竖向的步长都为4
卷积层向下取整
池化层向上取整