Impossible to import .onnx with importONNXLayers
10 views (last 30 days)
Show older comments
I am trying to import different onnx models from official repo. importONNXLayers always ends with error:
- ArcFace throws: Error using importONNXLayers (line 39) Size vector must have at least two elements.
- SqueezeNet throws: Error using importONNXLayers (line 39) Node 'squeezenet0_flatten0_reshape0': The Reshape operator is supported only when it performs a flattening operation.
- Emotion FerPlus throws: Error using importONNXLayers (line 39) Node 'Times622_reshape1': The Reshape operator is supported only when it performs a flattening operation.
I followed official documentation for using importONNXLayers function:
layers = importONNXLayers('squeezenet1.1.onnx','OutputLayerType','classification');
What is wrong here?
Answers (2)
Don Mathis
on 26 Oct 2018
Those ONNX models are somewhat unusual in their use of the Reshape operator. We are actively working on supporting more ONNX operators, and we specifically aim to be able to import models in the ONNX model zoo.
2 Comments
cui
on 24 Jan 2019
I also encountered the misplacement of the imported onnx model. I exported the pre-trained alexnet in pytorch, but the following error occurred when importing onnx in matlab. How can I solve this problem? Thank you

3 Comments
Kevin Chng
on 27 Jan 2019
Ya, i guess not all the layers of deep learning are supported by MATLAB currently.
See Also
Categories
Find more on Deep Learning with Images in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!