-
Notifications
You must be signed in to change notification settings - Fork 74k
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
Allow int16 input/output even when not using 16x8 quantization mode #56615
Comments
Hi @hguihot ! Could you also share a minimal standalone code too which will help expedite the issue. Thank you! |
Here is an example with 2 convolutions, both with the same 8-bit input but one with 8-bit output and the other with 16-bit output.
Two changes were actually required to make the conversion succeed:
|
Hi @sachinprasadhs ! Could you look at this feature request. Attached gist for reference. Thank you! |
Any update? |
As a feature request #56615, the _dtypes.int16 to be allowed when 16x8 quantization is not used so that the custom ops returning 16bit outputs can be benefitted.
We created PR #59526 to enable support |
Currently the valid types can be either
int16
orint8
/uint8
, but not a combination of both. Some models could for example contain a custom op returning anint16
tensor as model output, and converting such model to TFLite is failing. It looks like always adding_dtypes.int16
to the list of supported types when quant_mode.is_integer_quantization() is true would be enough to make it work.The text was updated successfully, but these errors were encountered: