Importing recurrent ONNX to Matlab throws error "ONNX network with multiple inputs or multiple outputs is not supported when one of the network inputs is sequential."
4 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Hello,
I am currently trying to import a trained ONNX model from Pytorch to Matlab. The exported model works fine in the onnxruntime, but I am a bit confused about the import to Matlab. I allready changed the dimension of the input vector from (25) to (1, 1, 25) to fit an image-like input. Now I get the error:
Error using nnet.internal.cnn.onnx.translateONNX (line 77)
ONNX network with multiple inputs or multiple outputs is not supported when one of the network inputs is
sequential.
Error in nnet.internal.cnn.onnx.importONNXLayers (line 10)
[LayersOrGraph, translationIssues] = nnet.internal.cnn.onnx.translateONNX(modelProto,
OutputLayerType, UserImageInputSize, ImportWeights);
Error in importONNXLayers (line 48)
Layers = nnet.internal.cnn.onnx.importONNXLayers(modelfile, varargin{:});
Error in onnx_to_mat (line 7)
layers = importONNXLayers(modelfile,'ImportWeights',true);
What is the definition of 'sequential' in Matlab? My model is a recurrent GRU model with two inputs (the last hidden state and the input vector). As I want to use the model online in a simulink simulation, my input is always non-sequential (just the vector and the last hidden state). I'll upload a example to reproduce the error.
I addition, here is a visualization of my onnx:
Thanks for your help!
1 comentario
LP
el 31 de Mayo de 2022
How did you creat this visualization of the onnx?
And did you managed to solve your problem?
Respuestas (1)
Raynier Suresh
el 18 de Feb. de 2021
Hi, Currently MATLAB does not supports multi input networks with the sequence input layer.I have brought this issue to the concerned people and it might be considered in any future release.
To understand what is a sequential input you can refer this link
1 comentario
Ver también
Categorías
Más información sobre Deep Learning Toolbox en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!