microsoft / onnxruntime

ONNX Runtime: cross-platform, high performance ML inferencing and training accelerator
https://onnxruntime.ai
MIT License
14.66k stars 2.93k forks source link

Can i quantize sigmoid activation (to QLinearSigmoid for example) in dynamic quantization? #19139

Open mattam301 opened 10 months ago

mattam301 commented 10 months ago

[Enter feedback here] Since i am trying to quantize efficientnet using both static and dynamic methods, then i realize that only the static one quantize sigmoid activation into: QuantizeLinear -> QlinearSigmoid_

But when i am trying to quantize using dynamic method, it turned out that sigmoid function cannot be quantized in default. As i read in quantize.py code, I cannot specify quant_format in DynamicQuantConfig, which seems lead to the above observation.

I wander what did i miss? Is there any reason why sigmoid cannot be quantized in dynamic method? Thanks in advance


Document Details

xadupre commented 9 months ago

Can you share the way you try to quantize your model and the error you get? That would help up to replicate and fix the bug if there is one.

github-actions[bot] commented 8 months ago

This issue has been automatically marked as stale due to inactivity and will be closed in 30 days if no further activity occurs. If further support is needed, please provide an update and/or more details.