-
Notifications
You must be signed in to change notification settings - Fork 118
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Concatenation has inconsistent input parameters quantization parameters #221
Comments
I tried to add a quantization operator below the nodes with different quantization parameters, and this solved the problem I encountered. But there are still some details that are not taken care of. |
Looks like a duplicate of #95 (comment) |
If not quantized, it would be unfriendly for devices like MCU, such as esp32s3. When exporting the YOLOv5 project to int8 TFLite, a quantization operator will also be added in this case. However, it is important to ensure that the values of the input tensor are within the same magnitude to avoid losing a significant amount of precision. Tomorrow, I will try exporting YOLOv8 to TFLite to see what the situation will be. The YOLOv8 project uses onnx2tf. |
Yes, but it seems the Pow op has Quantize and Dequantize ops around it, which is already not optimal. Even if #95 (comment) is resolved, we will add three more Quantize ops to perform re-quantization before the Concatenation op. Actually, I don't know how is the performance of the those ops using Float32 kernels on your hardware.
Yes, I agree with you. Otherwise, we can just use the q params of the output of the Logistics op as the unified one.
I suppose they will add Quantize nodes before the Concatenation nodes, which may lead to the same result. |
Let's continue the discussion in #95. |
Bug
After quantization, there is a issue of inconsistency in the quantization parameters of the input parameters of concatenation.
Reproduce
https://raw.githubusercontent.com/LynnL4/Public/main/tinynn/yolodetector_q.py
Expectation
Conncation uses consistent quantization parameters for all inputs and outputs
The text was updated successfully, but these errors were encountered: