ONNX export yields Error !

16 views (last 30 days)
hamed bastami
hamed bastami on 2 Dec 2019
Dear MathWorks Deep Learning Toolbox Team:
Hi, I tried to use exportONNXNetwork, I ran this part of code, but i saw this error, could you help me pls?!
Usage example:
%% Export to ONNX model format
net = squeezenet;
filename = 'squeezenet.onnx';
this error appear:
Error using nnet.internal.cnn.onnx.onnxmex
Invalid MEX-file
A dynamic link library (DLL) initialization routine failed.
Error in nnet.internal.cnn.onnx.ModelProto/writeToFile (line 50)
ModelPtr = onnxmex(int32(FuncName.EnewModelProto));
Error in nnet.internal.cnn.onnx.exportONNXNetwork (line 37)
writeToFile(modelProto, Filename);
Error in exportONNXNetwork (line 40)
nnet.internal.cnn.onnx.exportONNXNetwork(Network, filename, varargin{:});
Error in Untitled (line 5)
Adrià López Escoriza
Adrià López Escoriza on 30 Apr 2021
Same, the bug report does not seem solve the issue in MacOS

Sign in to comment.

Accepted Answer

Jon Cherrie
Jon Cherrie on 4 Apr 2021
It looks like you are hitting this bug:
There is a workaround listed in that bug report.

More Answers (1)

Neelanjana Pal
Neelanjana Pal on 12 Feb 2020
I also got the same issue but restarting the system solved my problem
cui on 16 Mar 2021
@Ting SuAfter copying onnxpb.dll, it can work now, thank you very much!

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!

Translated by