Skip to content
This repository has been archived by the owner on Oct 13, 2021. It is now read-only.

keras2onnx: LSTM bidirectional layer error #702

Open
chinmaychinara91 opened this issue Apr 6, 2021 · 0 comments
Open

keras2onnx: LSTM bidirectional layer error #702

chinmaychinara91 opened this issue Apr 6, 2021 · 0 comments

Comments

@chinmaychinara91
Copy link

Hi, I have a bidirectional LSTM trained keras model (.h5) which is as under:
bidirectional_LSTM.zip

I use a simple script for conversion:

from tensorflow.python.keras.models import load_model
import onnx
import keras2onnx
onnx_model_name = 'bidirectional_LSTM.onnx'

model = load_model('bidirectional_LSTM.h5')
onnx_model = keras2onnx.convert_keras(model, model.name)
onnx.save_model(onnx_model, onnx_model_name)

I get the error:
ValueError: Unsupported class for Bidirectional layer: <class 'tensorflow.python.keras.layers.recurrent_v2.LSTM'>

Using tensorflow_gpu version 2.3.1

How do I fix this ?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant