OpenPPL / ppq

PPL Quantization Tool (PPQ) is a powerful offline neural network quantization tool.
Apache License 2.0
1.57k stars 236 forks source link

LSQ算法微调后,输出的scale量化参数存在负值,请问如何修改源码,使其输出的scale为正值? #518

Open fengyanWang opened 1 year ago

fengyanWang commented 1 year ago

LSQ算法微调后,输出的scale量化参数存在负值,请问如何修改源码,使其输出的scale为正值?

ZhangZhiPku commented 1 year ago

在执行完lsq之后,让scale = abs(scale) 就好