Giter Club home page Giter Club logo

qkeras-mod's Introduction

qkeras-mod

This is an extension of the original QKeras repository.

The main novelty of this extension is the added support to affine uniform quantization [1][2][3] for activation layers by introducing a new layer called quantized_bits_featuremaps.

It also provides some modifications to AutoQKeras, such as the support to Batch Normalization fusion.

The explanation of all the modifications is in [4].

How to start

Create a new conda environment using the provided qkeras-env.yml environment, replace the original files of QKeras with the following ones, and then follow qkeras-mod-explained.ipynb:

  • autoqkeras/autoqkeras_internal.py -->

    <your_qkeras-env_installation_path>/autoqkeras/autoqkeras_internal.py

  • autoqkeras/forgiving_metrics/forgiving_bits.py -->

    <your_qkeras-env_installation_path>/autoqkeras/forgiving_metrics/forgiving_bits.py

  • qkeras/quantizers.py ->

    <your_qkeras-env_installation_path>/qkeras/quantizers.py

  • qkeras/utils.py -->

    <your_qkeras-env_installation_path>/qkeras/utils.py

If using this code, please cite our work

@ARTICLE{urbinati2024access,
author={Urbinati, Luca and Casu, Mario R.},
journal={IEEE Access}, 
title={High-Level Design of Precision-Scalable DNN Accelerators Based on Sum-Together Multipliers}, 
year={2024},
volume={12},
number={},
pages={44163-44189},
doi={10.1109/ACCESS.2024.3380472}}

References

[1] B. Jacob et al., "Quantization and Training of Neural Networks for Efficient Integer-Arithmetic-Only Inference," arXiv:1712.05877 [cs, stat], Dec. 2017. Available: http://arxiv.org/abs/1712.05877

[2] Mao, Lei. "Quantization for Neural Networks". Lei Mao’s Log Book, May 17, 2020, https://leimao.github.io/article/Neural-Networks-Quantization/

[3] H. Wu, P. Judd, X. Zhang, M. Isaev, and P. Micikevicius, “Integer Quantization for Deep Learning Inference: Principles and Empirical Evaluation,” arXiv:2004.09602 [cs, stat], Apr. 2020, Accessed: Dec. 22, 2021. [Online]. Available: http://arxiv.org/abs/2004.09602.

[4] Terlizzi, M. Alessio, "Mixed-precision Quantization and Inference of MLPerf Tiny DNNs on Precision-Scalable Hardware Accelerators", 2023, Politecnico di Torino. Accessed: Dec. 7, 2023. [Online]. Available: https://webthesis.biblio.polito.it/26664/.

qkeras-mod's People

Contributors

lucaurbinati44 avatar

Stargazers

Edward Manca avatar

Watchers

 avatar

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.