Skip to content

OpenNMT-tf onnx export ? #1006

@flutter-painter

Description

@flutter-painter

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions