前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >模型量化

模型量化

作者头像
用户1148525
发布2019-05-26 11:47:25
7570
发布2019-05-26 11:47:25
举报
文章被收录于专栏:机器学习、深度学习

TBN:Convolutional Neural Network with Ternary Inputs and Binary Weights ECCV_2018 paper

TBN 用 高效的 XOR, AND 及位运算 代替 传统CNN 中的 算术运算 TBN replaces the arithmetical operations in standard CNNs with efficient XOR, AND and bitcount operations, and thus provides an optimal tradeoff between memory, efficiency and performance.

provides ∼ 32× memory savings and 40× faster convolutional operations TBN 的性能 比 XNOR-Network 要 高 5% 点左右

如果我们只对网络的权重参数进行二值化,那么得到的结果是 内存空间降低32倍,计算速度提升2倍(因为避免了卷积中的乘法运算) Binarizing the network weights can directly result in ∼ 32× memory saving over the real-valued counterparts, and meanwhile bring ∼ 2× computational efficiency by avoiding the multiplication operation in convolutions

如果我们对网络的权重和网络层的输入信号同时进行二值化,通过 XNOR and bitcount operations 代替卷积中的算术运算,那么可以提速 58倍。当然这么的问题就是性能下降较大。 On the other hand, simultaneously binarizing both weights and the input signals can result in 58× computational efficiency by replacing the arithmetical operations in convolutions with XNOR and bitcount operations.

对此我们提出使用三值化网络层的输入信号来提升性能 ternary inputs constrain input signal values into −1, 0, and 1

Ternary-Binary Network (TBN) = 网络权重参数的二值化 + 网络层输入的三值化 By incorporating ternary layer-wise inputs with binary network weights, we propose a Ternary-Binary Network (TBN) that provides an optimal tradeoff between the performance and computational efficiency

TBN can provide ∼ 32× memory saving and 40× speedup over its real-valued CNN counterparts

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

下图显示不同量化策略对速度的提升影响

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

量化卷积过程

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

加速策略: AND, XOR and bitcount operations

训练过程

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

分类性能对比

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

检测性能对比

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

11

本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
原始发表:2018年11月01日,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档