quantizer

The THANNA quantizer module provides all necessary software to create or convert a tensorflow model, which can be run on the THANNA processor. The Python package is forked from the QKeras package. QKeras a nbit quantization library developed by google. But QKeras has many bugs and neihter runs out of the box and expecally not with the newest tensorflow version. Therefore we want to use this base and develope a easy to use and funktioning n-bit quantization library compatible with tensorflow.

Examoples for the usage of the quantizer

Examples for the usage of the quantizer can be found in the Thanna Gitlab in the Quantizer/codebook folder. The examples are based on the QKeras examples and are modified to work with the THANNA quantizer.

Supported and tested layers

  • Dense(QDense)

  • Convolutional2d(QConv2d)

Supported and tested quantizers

  • quantized_linear

  • quantized_bits

  • quantized_relu

Due to a bug the alpha value has to be 1 for all quantizers

Code Documentation