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

조회 수: 2 (최근 30일)
Balrog
Balrog 2020년 7월 26일
편집: Balrog 2020년 7월 26일
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
Balrog
Balrog 2020년 7월 26일
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"

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Image Data Workflows에 대해 자세히 알아보기

태그

제품


릴리스

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by