[深度学习] 卷积核的选择

为什么一个5*5的卷积核可以用两个3*3的卷积核代替,一个7*7的卷积核可以用三个的3*3卷积核代替? - 知乎

为什么一个5*5的卷积核可以用两个3x3卷积核代替呢?

主要原因很简单,因为两个3x3的卷积核的感受野的大小刚好是5x5。

下图是padding=1的情况,也可以padding=0。

 可以从这张图上看到,两个3x3的卷积核的感受野是不是5x5呢?那么为什么要进行把5x5替换成两个3x3呢?原因其实很简单,两个3x3的 参数量少 

  1. 假设输入维度 input_channel = output_channel;则

参数量:2个3x3的参数量为 2*3*3*input_channel * output_channel

5x5的参数量为:5*5*input_channel * output_channel。

对比起来,5*5的kernel是2个3*3kernel的参数量的25/18=1.39倍。

    2. 假设输入维度 input_channel * α= output_channel;则

Google文章说的是 Having a two layer replacement for the 5 × 5 layer, it seems reasonable to reach this expansion in two steps: increasing the number of filters by sqrt(α) in both steps。

则 mid_dim = sqrt(alpha)*input_channel

3x3的参数量为:3*3*input_channel* mid_dim + 3*3*mid_dim* output_channel

而且两个3*3 kernel 的表现力不输 5*5。还一个就是两个3*3的卷积核跟着两个激活activation(3x3-activation-3x3-activation), 可以有 更强的非线性能力

引用下这张图的解释:

the first layer is a 3 × 3 convolution, the second is a fully connected layer on top of the 3 × 3 output grid of the first layer (see Figure 1). Sliding this small network over the input activation grid boils down to replacing the 5 × 5 convolution with two layers of 3 × 3 convolution
  • 0
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

心心喵

喵喵(*^▽^*)

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值