{"id":865,"date":"2019-01-08T22:14:58","date_gmt":"2019-01-08T22:14:58","guid":{"rendered":"https:\/\/blogs.mathworks.com\/deep-learning\/?p=865"},"modified":"2021-04-06T15:51:18","modified_gmt":"2021-04-06T19:51:18","slug":"i-didnt-know-that-onnx","status":"publish","type":"post","link":"https:\/\/blogs.mathworks.com\/deep-learning\/2019\/01\/08\/i-didnt-know-that-onnx\/","title":{"rendered":"&#8220;I didn&#8217;t know that&#8221; &#8211; ONNX"},"content":{"rendered":"<div><span style=\"font-size: 14px;\"> Today, I'd like to introduce a new series called:<\/span>\r\n\r\n<h6><\/h6>\r\n<span style=\"font-size: 20px; font-family:cursive;\"> \"I didn't know that!\"<\/span>\r\n\r\n<\/div>\r\n&nbsp;\r\n<div>\r\n\r\n<span style=\"font-size: 14px;\"> 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.<\/span>\r\n\r\n<\/div>\r\n&nbsp;\r\n\r\n&nbsp;\r\n<div>\r\n\r\n<hr \/>\r\n\r\n<h6><\/h6>\r\n<span style=\"font-size: 14px;\">Today's <strong><em>\"I didn't know that\"<\/em><\/strong> is about <a href=\"http:\/\/ONNX.ai\"><span style=\"font-size: 16px;\">ONNX<\/span><\/a>.<\/span>\r\n<h6><\/h6>\r\n<span style=\"font-size: 14px;\">Did you know that MATLAB now supports import and export functions to and from the ONNX format? Steve wrote about the MATLAB -&gt; ONNX export capabilities <a href=\"https:\/\/blogs.mathworks.com\/deep-learning\/2018\/05\/18\/exporting-to-onnx\/\">a while back<\/a>, but I want to make sure that everyone knows: <\/span>\r\n<h6><\/h6>\r\n<span style=\"font-size: 14px;\">You can import models from the ONNX format into MATLAB and you can export MATLAB models to the ONNX format.<\/span>\r\n\r\n<img decoding=\"async\" loading=\"lazy\" width=\"759\" height=\"182\" class=\"alignnone size-full wp-image-885\" src=\"https:\/\/blogs.mathworks.com\/deep-learning\/files\/2019\/01\/onnx-to-matlab.png\" alt=\"\" \/>\r\n<h6><\/h6>\r\n<span style=\"font-size: 14px;\">It's very straightforward! <\/span>\r\n<h6><\/h6>\r\n<ul>\r\n \t<li><span style=\"font-size: 14px;\">Just download the support package <span style=\"text-decoration: underline;\"><a href=\"https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/67296-deep-learning-toolbox-converter-for-onnx-model-format\">here<\/a>.<\/span><\/span><\/li>\r\n<\/ul>\r\n<ul>\r\n \t<li><span style=\"font-size: 14px;\">Then you can use the functions:<\/span><\/li>\r\n<\/ul>\r\n<pre>importONNXNetwork<\/pre>\r\nand\r\n<pre>exportONNXNetwork<\/pre>\r\n<h6><\/h6>\r\n<h6><\/h6>\r\n<span style=\"font-size: 14px;\">Take a look at their website --\u00a0<a href=\"http:\/\/onnx.ai\/\">http:\/\/onnx.ai\/<\/a> -- and check out the companies that are currently supporting this initiative.<\/span>\r\n<h6><\/h6>\r\n<div id=\"attachment_875\" style=\"width: 1034px\" class=\"wp-caption aligncenter\"><img aria-describedby=\"caption-attachment-875\" decoding=\"async\" loading=\"lazy\" class=\"wp-image-875 size-large\" src=\"https:\/\/blogs.mathworks.com\/deep-learning\/files\/2019\/01\/screenshotfromwebsite-1024x268.png\" alt=\"\" width=\"1024\" height=\"268\" \/><p id=\"caption-attachment-875\" class=\"wp-caption-text\">Snapshot of ONNX's website, featuring MathWorks as part of the community!<\/p><\/div>\r\n\r\n<hr \/>\r\n\r\n<span style=\"font-size: 14px;\">Have a good tip or trick about MATLAB you think everyone should know? Leave a comment below, or follow me <a href=\"https:\/\/twitter.com\/jo_pings\">on Twitter<\/a>! You may be featured in an upcoming <em>\"I didn't know that\" <\/em>post.<\/span>\r\n<h6><\/h6>\r\n<span style=\"font-size: 12px;\">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!!<\/span>\r\n<h6><\/h6>\r\n<h6><\/h6>\r\n<img decoding=\"async\" loading=\"lazy\" width=\"453\" height=\"320\" class=\"alignnone size-full wp-image-889\" src=\"https:\/\/blogs.mathworks.com\/deep-learning\/files\/2019\/01\/ball_rolling2.gif.gif\" alt=\"\" \/>\r\n\r\n<\/div>\r\n<p><a href=\"https:\/\/twitter.com\/jo_pings?ref_src=twsrc%5Etfw\" class=\"twitter-follow-button\" data-size=\"large\" data-show-count=\"false\">Follow @jo_pings<\/a><script async src=\"https:\/\/platform.twitter.com\/widgets.js\" charset=\"utf-8\"><\/script><\/p>","protected":false},"excerpt":{"rendered":"<div class=\"overview-image\"><img decoding=\"async\"  class=\"img-responsive\" src=\"https:\/\/blogs.mathworks.com\/deep-learning\/files\/2019\/01\/onnx-to-matlab.png\" onError=\"this.style.display ='none';\" \/><\/div><p> Today, I'd like to introduce a new series called:\r\n\r\n\r\n \"I didn't know that!\"\r\n\r\n\r\n&nbsp;\r\n\r\n\r\n I'm hoping to highlight certain features about MATLAB and Deep Learning you may not be aware of! These... <a class=\"read-more\" href=\"https:\/\/blogs.mathworks.com\/deep-learning\/2019\/01\/08\/i-didnt-know-that-onnx\/\">read more >><\/a><\/p>","protected":false},"author":156,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[9],"tags":[],"_links":{"self":[{"href":"https:\/\/blogs.mathworks.com\/deep-learning\/wp-json\/wp\/v2\/posts\/865"}],"collection":[{"href":"https:\/\/blogs.mathworks.com\/deep-learning\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.mathworks.com\/deep-learning\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/deep-learning\/wp-json\/wp\/v2\/users\/156"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/deep-learning\/wp-json\/wp\/v2\/comments?post=865"}],"version-history":[{"count":17,"href":"https:\/\/blogs.mathworks.com\/deep-learning\/wp-json\/wp\/v2\/posts\/865\/revisions"}],"predecessor-version":[{"id":1008,"href":"https:\/\/blogs.mathworks.com\/deep-learning\/wp-json\/wp\/v2\/posts\/865\/revisions\/1008"}],"wp:attachment":[{"href":"https:\/\/blogs.mathworks.com\/deep-learning\/wp-json\/wp\/v2\/media?parent=865"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/deep-learning\/wp-json\/wp\/v2\/categories?post=865"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/deep-learning\/wp-json\/wp\/v2\/tags?post=865"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}