Deep Learning

Understanding and using deep learning networks

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the Original version of the page.

“I didn’t know that” – ONNX 3

Posted by Johanna Pingel,

Today, I'd like to introduce a new series called:
"I didn't know that!"
I'm hoping to highlight certain features about MATLAB and Deep Learning you may not be aware of! These posts will be short and sweet.

Today's "I didn't know that" is about ONNX.
Did you know that MATLAB now supports import and export functions to and from the ONNX format? Steve wrote about the MATLAB -> ONNX export capabilities a while back, but I want to make sure that everyone knows:
You can import models from the ONNX format into MATLAB and you can export MATLAB models to the ONNX format.
It's very straightforward!
  • Just download the support package here.
  • Then you can use the functions:
Take a look at their website -- -- and check out the companies that are currently supporting this initiative.

Snapshot of ONNX's website, featuring MathWorks as part of the community!

Have a good tip or trick about MATLAB you think everyone should know? Leave a comment below, or follow me on Twitter! You may be featured in an upcoming "I didn't know that" post.
In tribute to ONNX, and their unique banner that has you floating through a neural network, I created their oddly shaped geometric logo from their website, and made it into a spinning ball with MATLAB code. I hope you enjoy it as much as I do!!

3 CommentsOldest to Newest

Jack Xiao replied on : 1 of 3
i try import one onnx model exported from pytorch but failed... Is there any demo or examples demonstrating importing the onnx model which is exported by other platforms?
Jan Tesar replied on : 2 of 3
I have same experience as Jack Xiao. I didn't find any (I tried about 4 of them) model in official modelzoo ( that is working with matlab ONNXimport function. (probably going to be fixed, but who knows... )... Also exporting as onnx and importing back has some issues...
Johanna Pingel replied on : 3 of 3
This is excellent feedback, sorry for the issues! If you have any errors that are reproducable, you can send them to me: In the meantime - check out these reference docs with a few examples importing the ONNX format