Comments (6)
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.
LynnL4@6f62020
from tinyneuralnetwork.
Looks like a duplicate of #95 (comment)
from tinyneuralnetwork.
I think this part of the model should not be quantized, not only because of this, but also there are something that cannot be quantized like pow
.
from tinyneuralnetwork.
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.
from tinyneuralnetwork.
If not quantized, it would be unfriendly for devices like MCU, such as esp32s3.
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.
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.
Yes, I agree with you. Otherwise, we can just use the q params of the output of the Logistics op as the unified one.
The YOLOv8 project uses onnx2tf.
I suppose they will add Quantize nodes before the Concatenation nodes, which may lead to the same result.
from tinyneuralnetwork.
Let's continue the discussion in #95.
from tinyneuralnetwork.
Related Issues (20)
- Meet Detailed error: Tensor-likes are not close! using TFLiteConverter HOT 2
- [Converter] Need transpose optimization HOT 2
- Float model failed to convert to TFLite
- [converter] map gather(+reshape) ops with seperate consecutive indices to split(unpack) ops
- tinynn.converter module not found! HOT 2
- [CI] several tests for modifier failed
- Whether to support pytorch to keras HOT 1
- TransposeConv wrong shape? HOT 15
- change input to INT8 after converting to tflite HOT 2
- [converter] implement torch's `aten::scaled_dot_product_attention` operator HOT 2
- Request: clamp would be more efficient to go to Bounded Relu than Maximum + Minimum HOT 3
- Do not support PReLU module? HOT 5
- torch.max not working HOT 2
- OneShotChannelPruner results in the miss of some operators HOT 4
- KeyError when executing quantization HOT 5
- PyTorch 转 TFLite 使用 int8 量化 HOT 4
- Does tinynn support following int16 quantization? HOT 1
- jit.trace succeed but tinynn tracer failed HOT 1
- It became larger after converting to tflite model HOT 4
- how to do Post-training integer quantization with int16 activation HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tinyneuralnetwork.