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

卷积操作

  • 输入图像的大小为 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_widthF+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_heightF+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_widthF+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_heightF+2×P)/S+1
  • 2
    点赞
  • 18
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值