GithubHelp home page GithubHelp logo

Comments (6)

LynnL4 avatar LynnL4 commented on May 22, 2024

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.

peterjc123 avatar peterjc123 commented on May 22, 2024

Looks like a duplicate of #95 (comment)

from tinyneuralnetwork.

peterjc123 avatar peterjc123 commented on May 22, 2024

image
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.

LynnL4 avatar LynnL4 commented on May 22, 2024

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.

peterjc123 avatar peterjc123 commented on May 22, 2024

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.

peterjc123 avatar peterjc123 commented on May 22, 2024

Let's continue the discussion in #95.

from tinyneuralnetwork.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.