二值网络--Training Binary Weight Networks via Semi-Binary Decomposition

Training Binary Weight Networks via Semi-Binary Decomposition
ECCV2018

CNN模型的压缩或加速总体上分为三类: pruning-based methods, low-rank decomposition based methods, and quantization-based methods
本文属于 low-rank decomposition based methods,基本的思路就是对于实数值权重 W 我们对其进行矩阵分解为 UDV ,其中 U 和 V 是二值矩阵,D 是对角矩形。 在二值网络最初的阶段是使用一个 二值矩阵 B 来表示 W ,后来使用一个 α *B来近似W,α 是一个 scale factor ,接着使用了多个 α *B 来表示 W ,现在我们用 UDV 来表示 W 。基本的思路就是 二值网络的 representation capacity 与实数网络相比较差很多,我们需要不断的提升二值网络的 representation capacity 也就是取值范围

3 Our method
3.1 Preliminary
对于卷积层权重 W,一开始是使用 sign function 直接 二值化
在这里插入图片描述
后来使用一个 α *B来近似W
在这里插入图片描述
问题: parameters in the same convolutional kernels has the same magnitude α,表征能力还是差了,取值范围还是小

3.2 Semi-Binary Decomposition
在这里插入图片描述
Eq. (3) is hard to solve due to the binary constraints, here we learn the components in a greedy way
上面这个方程很难求解,这里采用贪婪方式学习
在这里插入图片描述
To solve Eq. (4), we propose an alternating optimization method i.e. iteratively update one decomposition factor with other factors fixed.
在这里插入图片描述
3.3 Featuremap-Oriented Semi-Binary Factors
直接对网络所有层的 W 使用 semi-binary decomposition 进行分解有两个弊端:1)在前向计算时,权重乘以输入特征图,二值量化误差会被输入特征图放大。2)直接对整个网络使用 semi-binary decomposition 会造成精度的较大下降,因为量化误差通过多层的累积。

如何解决这个问题了? learn the semi-binary components via minimizing the output featuremap’s quantization loss
在这里插入图片描述
3.4 Fine-tuning
经过矩阵分解后,我们对于一个 convolutional layer with T covolutional kernels of size c ∗ d ∗ d, replace the original layer with three layers: a convolutional layer conv v, one scale layer scale d, and a convolutional layer conv u. Layer conv v has K covolutional
kernels of size c ∗ d ∗ d, layer conv u has T covolutional kernels of size K ∗ 1 ∗ 1 and layer scale d has only K parameters

3.5 Complexity Analysis
在这里插入图片描述
Tm be the time for one multiplication operation, and let Ta be the time for one addition operation
加速: 大约等于 一个乘法计算时间 / 一个加法加速时间

ImageNet2012 dataset
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

11

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值