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

OpenNMT-tf onnx export ? #1006

Open
flutter-painter opened this issue Jan 14, 2024 · 0 comments
Open

OpenNMT-tf onnx export ? #1006

flutter-painter opened this issue Jan 14, 2024 · 0 comments

Comments

@flutter-painter
Copy link

flutter-painter commented Jan 14, 2024

Based on OpenNMT/OpenNMT-py#638
I suppose this is not possible to export to onnx using OpenNMT-tf either,
But since libs are different and the onnx repo is different I had to ask.

I followed onnx doc
and run :

python -m tf2onnx.convert --saved-model pathto/toy-ende_dir/ --output dst/path/model.onnx --opset 13

=> error : 2024-01-14 16:35:24,876 - ERROR - rewriter <function rewrite_single_direction_lstm at 0x7fe2828c2f70>: exception graph input 'length' not exist

I also tried running it for tflite :

python -m tf2onnx.convert --tflite pathto/toy-ende_lite/opennmt.tflite --output dst/path/model.onnx --opset 13

=> ValueError: Received a shape scalar with unknown static value. A static value of '-1' is required to represent an unknown shape.

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