Problem with compiled script [MWMCR::EvaluateFunction error] with deep learning toolbox 2021b

9 Ansichten (letzte 30 Tage)
I have a script that loads a pretrained deep learning network and calls function classify, this is included in a helper function as suggested in official documentation:
function out = testnt(in)
persistent dat;
spath = 'E:\';
if isempty(dat)
dat = coder.loadDeepLearningNetwork([spath,'dat.mat']);
end
out= classify(dat,in);
end
This works well from within MATLAB, but as soon as it is run after being compiled as .NET assembly, it does not work and the following error message is shown:
... MWMCR::EvaluateFunction error ...
coder.internal.loadDeepLearningNetwork。
'coder.internal.loadDeepLearningNetwork' was excluded from packaging for the MATLAB Runtime environment according to the MATLAB Compiler license.
Have the application owner either resolve the file or function from the code, or use the MATLAB function "isdeployed" to ensure the function is not invoked in the deployed component.
This is tested in Matlab 2021b with compiler and compiler sdk installed. The key problem seems to be related to loadDeepLearningNetwork and classify, since other codes without functions from deep learning toolbox works fine with after deployed as DLL.
Is this related to a internal error with matlab runtime? or we need to buy additional license to make this work? Thx

Antworten (0)

Kategorien

Mehr zu Deep Learning Toolbox finden Sie in Help Center und File Exchange

Produkte


Version

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by