Can't "coder.loadDeepLearningNetwork" import a custom network model?
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
When I am going to use GPU Coder to generate cuda code for my custom depth model, matlab2019b unexpectedly terminates, and matlab2019a reports that fopen generates invalid identifier), how can I solve it? In addition, the custom model I imported is also very simple, bvlc's googlenet, not comes with pre-trained googlenet, my code is as follows, the model see attachment (can be loaded to matlab normally, each layer also supports code generation)
my gpu environment is OK:
envCfg = coder.gpuEnvConfig('host');
envCfg.DeepLibTarget = 'cudnn';
envCfg.DeepCodegen = 1;
envCfg.Quiet = 1;
coder.checkGpuInstall(envCfg);
and the code deploy is:
function out = googlenet_predict(in) %#codegen
persistent mynet;
if isempty(mynet)
mynet = coder.loadDeepLearningNetwork('bvlc_googlenet.mat','googlenet'); % can directly load to matlab workspace,but can't load to GPU Coder to generate???
end
% pass in input
out = predict(mynet,in);
The code that generates the configuration is:
cfg = coder.gpuConfig('dll');
cfg.TargetLang = 'C++';
cfg.DeepLearningConfig = coder.DeepLearningConfig('cudnn');
cfg.DeepLearningConfig.AutoTuning = true;
codegen -config cfg googlenet_predict -args {ones(224,224,3)} -report
My matlab version environment is:
MATLAB Version: 9.7.0.1190202 (R2019b)
OS:win10
download model: bvlc_googlenet.mat
0 Kommentare
Antworten (1)
David Fink
am 14 Okt. 2019
The crash in R2019b and error in R2019a are not expected.
Please reach out to MathWorks Technical Support with the reproduction steps (as you've described above) and files.
0 Kommentare
Siehe auch
Kategorien
Mehr zu Get Started with GPU Coder finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!