analogdevicesinc / ai8x-synthesis

Quantization and Synthesis (Device Specific Code Generation) for ADI's MAX78000 and MAX78002 Edge AI Devices
Apache License 2.0
55 stars 47 forks source link

output_shift limits introduced for quantization.py #280

Closed alicangok closed 1 year ago

alicangok commented 1 year ago

This is carried out by using a similar mechanism used in quantization-aware-training. It fixes potential underflow and overflow issues, adapting for different quantization bits.

alicangok commented 1 year ago

Updated the pull request with the linter patch, as well as fixing the device name for an effnet2 model (previously it was set to MAX78000, and the script would return a "This device supports up to 32 layers" error).