Skip to content
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

FP16 quantized TFLite model performs strangely when using XNNPACK or FP16 acceleration #1043

Open
Mayner0220 opened this issue Feb 25, 2025 · 1 comment
Assignees
Labels
status:awaiting LiteRTer information is sufficient and the issue is escalated type:precision/accuracy For issues where the precision/accuracy appear incorrect

Comments

@Mayner0220
Copy link

Mayner0220 commented Feb 25, 2025

1. System information

  • OS Platform and Distribution: Linux Ubuntu 22.04.5 LTS
  • TensorFlow installation: pip package
  • TensorFlow library
    tensorflow-gpu==2.9.3
    tensorflow-addons==0.19.0
    tensorflow-probability==0.17.0
    
  • Mobile device

    ❗ It has been confirmed that it is not an issue arising from the dependence on mobile devices.

    • Samsung Galaxy Tab S7 (Android)
    • Apple iPad M2 Air 13in (iPadOS)

2. Code

  • It is difficult to provide the code for personal reasons. 😢

3. Describe the current behavior

  • For the purpose of mobile deployment, I converted the Human Pose Estimation(HPE) model into TFLite after training. FP16 quantization was applied for the lightweight of the model at the time of conversion to TFLite. When testing the converted model after deployment to mobile devices, it was found that the inference results of the model were strange, which could be solved by deactivating XNNPACK and FP16 operations. (Examples of this can be found below.)
  • The below phenomenon occurred when the model's existing backbone was changed to a new backbone, and the newly applied backbone is ConvFormer-S18.
Activating XNNPACK or FP16 Deactivating XNNPACK or FP16
Image Image

4. Describe the expected behavior

I hope that the inference result of the model will be normal even when using the XNNPACK and FP16 operations.

Q&A to resolve this issue is welcome. Please feel free to leave your comments or questions.

@Mayner0220 Mayner0220 changed the title FP16 quantized TFLite model performs strangely when using XNNPACK or FP16 accelration FP16 quantized TFLite model performs strangely when using XNNPACK or FP16 acceleration Feb 25, 2025
@pkgoogle pkgoogle self-assigned this Feb 26, 2025
@pkgoogle
Copy link

Yeah that doesn't look right. We'll take a look.

@pkgoogle pkgoogle added type:precision/accuracy For issues where the precision/accuracy appear incorrect status:awaiting LiteRTer information is sufficient and the issue is escalated labels Feb 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:awaiting LiteRTer information is sufficient and the issue is escalated type:precision/accuracy For issues where the precision/accuracy appear incorrect
Projects
None yet
Development

No branches or pull requests

2 participants