19

高效神经网络设计I | 鸢尾花开

 4 years ago
source link: http://ishero.net/%E9%AB%98%E6%95%88%E7%A5%9E%E7%BB%8F%E7%BD%91%E7%BB%9C%E8%AE%BE%E8%AE%A1I.html?
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client


这段时间比较关注高效网络设计,因此写下此文做相关记录。
关于高效神经网络设计,我发现了一篇文章总结的不错,我也是从这篇文章出发的。

如何重新设计网络?

我将设计网络分为了五个层次:

  • 0、入门级,直接整体替换backbone

    例如将VGG16换为mobilenet。

  • 1、初级,减channel,砍block

    即成比例地降低一个经典网络的channel,例如channel数降低为之前的1/2;或者stage的block重复数减小,例如将某个stage的block重复数从8减小为6。

  • 2、中级,替换block

    比如mobilenetv2出来了之后,整体将之前模型的block替换为mobilenetv2的block;或者shufflenetv2出来之后,整体将之前模型的block替换为shufflenetv2的结构。

  • 3、高级,从头开始设计,集众家之所长

    即理解业界各个经典模型背后的motivation以及解决思路,不再拘泥于生搬硬套。将各个经典模型背后的设计思路吃透,了然于胸,下笔如有神。

  • 4、科学家,设计出新的模块,为业界添砖加瓦,例如depthwise separable convolutions,shuffle channel等等。

Depthwise separable convolutions

深度可分离卷积计做的一件是将普通的卷积操作分解为两步,这可以有效减少网络参数数量。

  • 1.先在2D尺度做卷积,
  • 2.再在通道尺度做卷积。

具体对比可参考此文:卷积神经网络中的Separable Convolution

Low rank filter

目的:去除冗余,并且减少权值参数
方法:采用两个K1的卷积核替换掉一个KK的卷积核
参考此文:模型压缩中的低秩分解

Pointwise group convolution

pointwise convolution和channel shuffle的组合

1580201769227-db5a6438-6555-4420-bf0d-3184a06ede90.jpeg#align=left&display=inline&height=432&originHeight=432&originWidth=800&size=0&status=done&style=none&width=800


参考此文:ShuffleNet阅读笔记

Dilated convolution

空洞卷积是卷积运算的一种方式,它增大了感受野却不丢失语义信息

1580200950069-0cc8fab0-a71d-42a3-b2d0-c1590cda1558.png#align=left&display=inline&height=449&originHeight=449&originWidth=812&size=0&status=done&style=none&width=812

避免网络分支太多,或者group太多

group卷积就是将输入特征图的channels Ci差分为g个组,每组Ci/g个特征图
关于group参考此文:卷积神经网络group群卷积以及group lasso

减少element wise的操作

即减少乘法操作


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK