Giter Club home page Giter Club logo

fcos-deepshift's Introduction

说明

DeepShift把卷积中的乘法转换成shift+sgn,本质上是n位二进制小数的round。

原始值越小精度越高,原始值越大精度越低,例如round(0.6) = 0.5,error=0.1,round(3) = 2,error=1。

如果训练的模型的weight都是较小的值,这种方式能实现保证模型原始精度的量化加速。

官方的代码只有分类的,拿FCOS测试了一下在检测中的效果。

测试发现最好前期先训练一个正常的检测模型,然后再转换成DeepShift模型并finetune,finetune时量化范围可以逐渐缩小,官方默认的量化范围是(-15, 0),正常的检测模型weight如果大于1比较多,误差会较大,个人推荐(-10, 5),对应浮点范围大概是(2^-10 ~2^5),大概占用16bit。

安装

参考FCOS和DeepShift。

https://github.com/mostafaelhoushi/DeepShift

https://github.com/tianzhi0549/FCOS

fcos-deepshift's People

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.