模型压缩(4) - SqueezeNet

SqueezeNet: AlexNet-level accuracy with 50x fewer parameters and <0.5MB model size

   

论文地址: Arxiv Paper

Github: Caffe

   

设计理念:

  • 使用1x1 conv 替换 3x3 conv

    1x1conv的参数量是3x3conv的1/9

    在expand 中用部分conv1x1替换3x3,目的是为了不影响Accuracy

  • 减少conv3x3的ic (input channel)

                             通过squeeze 中conv1x1对expand的输入进行降维,即减少expand对应的ic

  • 延迟下采样

                             前面的layers有更大的特征图,有利于提升模型的Accuracy

                   downsampling的方法:strides>1的卷积层,pooling layer

   

Fire Module

模块化卷积 key points:

  • squeeze conv1x1 layer: 使用conv1x1进行channel的降维, 达到1中第一小点
  • Expand conv1x1+conv3x3 layer: 部分使用conv1x1替代conv3x3,
  • 可调节参数
s1x1 (squeeze convolution layer中conv1x1的output channel)
e1x1 (expand convolution layer中conv1x1的output channel)
e3x3 (expand convolution layer中conv3x3的output channel)
令s1x1 < e1x1 + e3x3,既能减少参数,又保证了精度,实现1中第二小点 

 

      • fire module 实际上是bottle neck module的变形与InceptionV1模块区别不大,只是少做了几种尺度的卷积而已。

   

Network structure

  • Left: 标准的squeezeNet
  • Middle: 加入了残差bypass结构
  • Right:加入了复杂的bypass结构

 

参数详细说明

  • 参数量计算公式:oc x ic x kh x kw
  • 原始不加Fires module的参数计算

    输入55x55x96, 输出55x55x128

    参数量: 128x96x3x3 = 110,592 (不明白Table1中为什么是11920?)

  • 加入Fire2 module的参数计算

    Squeeze conv1x1: 96x16x1x1

    Expand conv1x1: 16x64x1x1

    Expand conv3x3: 16x64x3x3x 1/3(sparsity)

    参数量:96x16x1x1 + 16x64x1x1 + 16x64x3x3x 1/3 = 4,096 (也不是Table1中的5746?)

Reference

SqueezeNet详细解读

SqueezeNet模型详解

posted @ 2018-04-21 21:13  Fighting-Lady  阅读(1281)  评论(0编辑  收藏  举报