run the executable on the PC without Deep Learning Toolbox installed
Show older comments
I installed Matlab R2022a on my PC, Deep Learning Toolbox is also installed. I used the functions of Deep Learning Toolbox in my code, then build a Matlab executable.
I want to run this Matlab executable on another PC, Matlab Runtime R2022a is installed on this PC, I found Deep Learning Toolbox is not installed, Matlab executable crash when running on this PC.
Do you know how to install Deep Learning Toolbox in Matlab Runtime? or how can I run the executable on the PC without Deep Learning Toolbox installed?
Answers (1)
Walter Roberson
on 14 Apr 2023
0 votes
You cannot compile any of the learning / training functions of Deep Learning Toolbox.
You can however train a network beforehand, save the network to a .mat file, and then construct different code that load()'s the network and uses it for prediction or classification, and compile that code.
4 Comments
bo
on 14 Apr 2023
Edited: Walter Roberson
on 14 Apr 2023
Walter Roberson
on 14 Apr 2023
When you use that form of load(), the variable "poofs" into existence, and MATLAB does not know it has been created. You should use
%#function dlnetwork
datacell = load("model.mat","nnetwork");
nnetwork = datacell.nnetwork;
Note that if you want to use predict() then you need to do
nnet = importONNXLayers(modelPath, ...);
nnetwork = dlnetwork(nnet);
save("model.mat","nnetwork");
Using assembleNetwork like you did would be for the case where you planned to use classify()
bo
on 19 Apr 2023
Steven Lord
on 19 Apr 2023
Categories
Find more on Introduction to Installation and Licensing 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!