Can't "coder.loa​dDeepLearn​ingNetwork​" import a custom network model?

5 visualizzazioni (ultimi 30 giorni)
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

Risposte (1)

David Fink
David Fink il 14 Ott 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.

Categorie

Scopri di più su Get Started with GPU Coder in Help Center e File Exchange

Prodotti


Release

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by