Giter Site home page Giter Site logo

equalization's Introduction

equalization_code

This code is an implementation example of the equalization algorithm as introduce in the paper

Same, Same But Different: Recovering Neural Network Quantization Error Through Weight Factorization.

To use this repository you need to install git LFS. Follow the instructions here: https://git-lfs.github.com/.

After cloning the reposetory install the requirements.

pip install -r requirements

There are 5 examples: ResNet_v1_18, Inception_v1, Inception_v3, DenseNet121, and MobileNet_v2_1.4. For each net there are net description file <.hn>, weights file <_params.npz>, and extremum values per layer file <*_layer_inference_data.npz>. The net description files are "caffe like" txt files that describe the network graph. The extermum values are obtained by running a calibration batch of 64 images through the network and, for each layer, taking the min,max value of the activation as the extremum value (note: this is done after the BN layer has been folded).

The algorithm described in the paper is fully contained within equlization.py. The default setting is to run the one_step method and is run by:

python equalization.py

Two step algorithm can be run by calling

python equalization.py two_steps

The script will generate post equalization weights and store them to files <*._params_eq.npz>

equalization's People

Contributors

icml2019 avatar eldadmeller avatar

Stargazers

 avatar Yiqian He avatar C.X.Yang avatar  avatar  avatar edpzou avatar  avatar LeeHX avatar STYLIANOS IORDANIS avatar  avatar

equalization's Issues

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.