卷积操作
- 输入图像的大小为 o l d _ w i d t h × o l d _ h e i g h t × 3 old\_width \times old\_height \times 3 old_width×old_height×3
- 卷积核的数量为 N N N
- 卷积核的尺寸为 F × F × 3 F \times F \times 3 F×F×3(卷积核的通道数应该与输入图像的通道数保持一致,均为3)
- 卷积步长(stride)为 S S S
- 填充(padding)数量为
P
P
P
则卷积后的图像尺寸大小为 n e w _ w i d t h × n e w _ h e i g h t × N new\_width \times new\_height \times N new_width×new_height×N(卷积后的图像厚度为卷积核的数量 N N N)
其中,
n e w _ w i d t h = ( o l d _ w i d t h − F + 2 × P ) / S + 1 new\_width=(old\_width - F + 2 \times P) / S+1 new_width=(old_width−F+2×P)/S+1
n e w _ h e i g h t = ( o l d _ h e i g h t − F + 2 × P ) / S + 1 new\_height=(old\_height - F + 2 \times P) / S+1 new_height=(old_height−F+2×P)/S+1
池化操作
- 输入图像的大小为 o l d _ w i d t h × o l d _ h e i g h t × 3 old\_width \times old\_height \times 3 old_width×old_height×3
- 卷积核的数量为 N N N
- 卷积核的尺寸为 F × F × 3 F \times F \times 3 F×F×3
- 卷积步长(stride)为 S S S
- 填充(padding)数量为
P
P
P
则池化后的图像尺寸大小为 n e w _ w i d t h × n e w _ h e i g h t × N new\_width \times new\_height \times N new_width×new_height×N(池化不改变图片的通道数 N N N)
其中,
n e w _ w i d t h = ( o l d _ w i d t h − F + 2 × P ) / S + 1 new\_width=(old\_width - F + 2 \times P) / S+1 new_width=(old_width−F+2×P)/S+1
n e w _ h e i g h t = ( o l d _ h e i g h t − F + 2 × P ) / S + 1 new\_height=(old\_height - F + 2 \times P) / S+1 new_height=(old_height−F+2×P)/S+1