模型壓縮(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模型詳解


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM