MATLAB Answers

How to reliably export a deep neral network for use in applications

1 view (last 30 days)
Kenneth Post
Kenneth Post on 26 Dec 2018
Commented: Ken Post on 17 Jul 2019
Using deep learning neural networks is fairly easy in Matlab, but I cannot find a way to reliably use my trained network ( created in Matlab) in Python or any other application. If I cannot use my trained neural network ( export it from Matlab) then why should I use Matlab for Deep Learning if I can’t use it outside of Matlab?
Matlab needs to have an easy and reliable method for transferring trained networks for use in other applications.
I tried using exportONNXNetwork to export my trained network but continue to have difficulties such as "ValueError: Gemm: Invalid shape, input A and B are expected to be rank=2 matrices" when using CNTK and Python. This method fails to work. I used transfer learning (googleNet and AlexNet) and recived the same results.
I found no other "reliable" methods to transfer/export my trained network to be used outside of Matlab...this is very frustrating.
Any "working" tutorials on how to do this reliably? The tutorials I've found, so far, either do not work or are not explained well enough for someone to understand properly.
Thank you,
Ken Post
Ken Post on 17 Jul 2019
The workaround did not work for me, so I'm not suprised it is gone...must not have worked for anyone else either!

Sign in to comment.

Answers (0)




Community Treasure Hunt

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

Start Hunting!

Translated by