-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
[Frontend][TFLite] Dynamically calculate input_stats of any fake_quant range #4789
Conversation
* pass the input range to the convertor and caclulate (mean, scale) there * change the range of the second tensor in elemwise operations so that we test inputs with different quant params * change the possible output range for elemwise ops wrt the updated ranges * update the comments for (m, s) calculations * add input range dict to reduce_mean op
@kevinthesun @anijain2305 can you please take a look |
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.
Overall LGTM
Sorry for the late review.
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.
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.
LGTM
@kevinthesun Can this be merged?
Edit - @inadob Seems like your newly added assertion is getting triggered. Can you please fix it?
* add exception handling for zero division in input_stats * fix range of the input tensor in elemwsie
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.
LGTM
Thanks @inadob @wyc-ruiker @anijain2305 |
…t range (apache#4789) * [TFLite] Dynamically calculate input_stats of any fake_quant range * pass the input range to the convertor and caclulate (mean, scale) there * change the range of the second tensor in elemwise operations so that we test inputs with different quant params * change the possible output range for elemwise ops wrt the updated ranges * update the comments for (m, s) calculations * add input range dict to reduce_mean op * Apply requested changes * add exception handling for zero division in input_stats * fix range of the input tensor in elemwsie
…t range (apache#4789) * [TFLite] Dynamically calculate input_stats of any fake_quant range * pass the input range to the convertor and caclulate (mean, scale) there * change the range of the second tensor in elemwise operations so that we test inputs with different quant params * change the possible output range for elemwise ops wrt the updated ranges * update the comments for (m, s) calculations * add input range dict to reduce_mean op * Apply requested changes * add exception handling for zero division in input_stats * fix range of the input tensor in elemwsie
…t range (apache#4789) * [TFLite] Dynamically calculate input_stats of any fake_quant range * pass the input range to the convertor and caclulate (mean, scale) there * change the range of the second tensor in elemwise operations so that we test inputs with different quant params * change the possible output range for elemwise ops wrt the updated ranges * update the comments for (m, s) calculations * add input range dict to reduce_mean op * Apply requested changes * add exception handling for zero division in input_stats * fix range of the input tensor in elemwsie
so that we test inputs with different quant params