Skip to content

Could you provde a guide for how to convert LSTM model #640

@fanghuaqi

Description

@fanghuaqi

Hi, according to this link https://github.com/onnx/tensorflow-onnx/blob/master/examples/rnn_tips.md, rnn and lstm cells are supported, but I tried to convert some frozen lstm model, I can't convert it correctly, the converter is just doing operator to operator conversion, but I am expecting the tensorflow lstm graph nodes can be converted to onnx lstm node, not like this.

I tried to convert the model located in tests/models/lstm/frozen.pb, here is my command:

python tf2onnx/convert.py --input tests/models/lstm/frozen.pb --output test.onnx --inputs X:0,keep_prop:0 --outputs output:0 -v --opset 8  --fold_const

here is the converted graph
image

I thought the converted graph should use LSTM operator of ONNX, but actually not, could you give me some hints on it.

Thanks
Huaqi

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions