ONNX file exported from MATLAB doesn't work with other frameworks

2 visualizaciones (últimos 30 días)
Balrog
Balrog el 26 de Jul. de 2020
Editada: Balrog el 26 de Jul. de 2020
I have a simple LSTM net exported as ONNX and I tried to use it with X-Cube-AI in ST and when it flagged an error with no apparent explanation, I moved to convert the ONNX to keras
import onnx2keras
from onnx2keras import onnx_to_keras
import keras
import onnx
onnx_model = onnx.load('adamLSTM_50.onnx')
k_model = onnx_to_keras(onnx_model, ['sequenceinput'])
Errors
(DEBUG:onnx2keras:Check if all inputs are available:
DEBUG:onnx2keras:Check input 0 (name sequenceinput).
DEBUG:onnx2keras:The input not found in layers / model inputs.)
It would be great if someone can help with what the problem could be?
  1 comentario
Balrog
Balrog el 26 de Jul. de 2020
I find that the layers(1).Name etc are empty and I filled those. But after that I see after loading the model in python, there are fields that are empty. One of this is related to sequence_lens. I am not sure of what to do?
>>> onnx_model.graph.node
[input: "Input"
input: "BiLSTM_W"
input: "BiLSTM_R"
input: "BiLSTM_B"
input: ""
input: "BiLSTM_initial_h"
input: "BiLSTM_initial_c"
output: ""
output: "BiLSTM"
name: "BiLSTM"

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Image Data Workflows en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2020a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by