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

Quantization error #2

Open
chinmayjog13 opened this issue Jun 8, 2023 · 0 comments
Open

Quantization error #2

chinmayjog13 opened this issue Jun 8, 2023 · 0 comments

Comments

@chinmayjog13
Copy link

First of all, thanks for your experiments and code!

I have tried quantizing arcface models before, and have run into two specific issues.

Both issues have to do with the code here- https://github.com/DavorJordacevic/IResNet-ArcFace-Knowledge-Distillation/blob/5a7ade543cd422b6b318c20c48794de317e63da7/backbones/iresnet.py#LL37C9-L44C29

First, the bn1 layer cannot be fused with another layer, and cannot be exported to onnx after quantization.
Second, using PReLU drops the quantized model accuracy close to zero. It has to do with something in the pytorch's own code. Replacing it with ReLU during training solves this issue.

My question to you is, did you come across these issues, and how did you solve them?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant