卷积/池化后图像大小计算公式

卷积操作

  • 输入图像的大小为 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
  • 卷积核的数量为 N N
  • 卷积核的尺寸为 F × F × 3 F \times F \times 3 (卷积核的通道数应该与输入图像的通道数保持一致,均为3)
  • 卷积步长(stride)为 S S
  • 填充(padding)数量为 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 (卷积后的图像厚度为卷积核的数量 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
    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

池化操作

  • 输入图像的大小为 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
  • 卷积核的数量为 N N
  • 卷积核的尺寸为 F × F × 3 F \times F \times 3
  • 卷积步长(stride)为 S S
  • 填充(padding)数量为 P P

猜你喜欢

转载自blog.csdn.net/gaolijing_/article/details/104423228