-
Notifications
You must be signed in to change notification settings - Fork 73
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
Constant outputs removed from ONNX during conversion #627
Comments
Thanks you very much. |
Since TensorFlow v2.15.0, the API specification has changed significantly with destructive changes to Keras, so backwarding the current onnx2tf code base to TensorFlow v2.14.0 and earlier API and maintaining multiple onnx2tf versions It is very costly and impractical to maintain multiple versions of onnx2tf. Therefore, the following measures can be taken.
|
Thank you very much. A different ONNX model that includes a resize layer is attached - Following the comment in https://github.com/PINTO0309/onnx2tf/pull/628/files I added the flag "-nuo" to my command, but when I try to run "onnx2tf -i toy_with_constant_and_resize.onnx -osd -nuo" I get the following error - |
Issue Type
Others
OS
Linux
onnx2tf version number
1.1.30
onnx version number
1.12.0
onnxruntime version number
1.17.30
onnxsim (onnx_simplifier) version number
0.4.8
tensorflow version number
2.10.0
Download URL for ONNX
toy_with_constant.onnx.zip
toy_with_constant_after_conversion.onnx.zip
Parameter Replacement JSON
Description
Thanks you for this great contribution!
My model, in addition to its regular output, has a constant output.
I'll explain - when the model get an image as input, it returns - (1) a set of features (2) a constant array.
Though it may sound as a strange practice, I find it useful to deploy the model with all the constants required for the post-process.
When running - "onnx2tf -i toy_with_constant.onnx -osd", the ONNX is changed so the constant output is removed, and the tflite output also does not contain this output.
It would be very helpful if there is way to convert the ONNX to tflite in a way that would preserve the constant output.
Thank you!
The text was updated successfully, but these errors were encountered: