Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork56.4k
dnn cleanup: On-fly-quantization removal#24980
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
fengyuentau commentedFeb 8, 2024
Should we keep
|
fengyuentau commentedFeb 8, 2024
Ubuntu2004-x64-CUDA / BuildAndTest: I took a loot at the model and it has nothing to do with quantization, so this should not be related to the changes in this PR. |
vpisarev commentedFeb 8, 2024
@fengyuentau, since the error is still very low, probably it makes sense just slightly increase the tolerance threshold, e.g. from 0.0007 to 0.001 |
fengyuentau commentedFeb 8, 2024
Yes, sure. I want to find out whether it is sporadic and do it in antoher PR. |
asmorkalov commentedFeb 12, 2024
Related:#24993 |
| CV_WRAPvoidgetInputDetails(CV_OUT std::vector<float>& scales, CV_OUT std::vector<int>& zeropoints)const; | ||
| /** @brief Returns output scale and zeropoint for a quantized Net. | ||
| * @param scales output parameter for returning output scales. | ||
| * @param zeropoints output parameter for returning output zeropoints. | ||
| */ | ||
| CV_WRAPvoidgetOutputDetails(CV_OUT std::vector<float>& scales, CV_OUT std::vector<int>& zeropoints)const; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
I suppose thatgetInputDetails andgetOutputDetails should be presumed. We support pre-quantized networks and the mentioned API is not related to on-fly quantization.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
They are only used intest_int8_layers.cpp which quantizes nets on the fly (thus you need to quantize the inputs manually with theinputDetails). I don't think they are useful anymore given the fact that we are removing on-fly quantization.
Uh oh!
There was an error while loading.Please reload this page.
vpisarev commentedFeb 14, 2024
@fengyuentau, thank you! We discussed it briefly with@asmorkalov. Indeed, the functionality shall be removed and the tests should be commented off. It's recommended to use |
fengyuentau commentedFeb 16, 2024
I think |
fengyuentau commentedFeb 16, 2024
I used |
asmorkalov left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
👍
Uh oh!
There was an error while loading.Please reload this page.
On-fly-quantization is first introduced via#20228. We decided to remove it but keep int8 layers implementation because on-fly-quantization is less practical given the fact that there has been so many dedicated tools for model quantization.
Pull Request Readiness Checklist
See details athttps://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request
Patch to opencv_extra has the same branch name.