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

4 visualizaciones (últimos 30 días)
cui,xingxing
cui,xingxing el 14 de Oct. de 2019
Respondida: David Fink el 14 de Oct. de 2019
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

Respuestas (1)

David Fink
David Fink el 14 de Oct. de 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.

Categorías

Más información sobre Get Started with GPU Coder en Help Center y File Exchange.

Productos


Versión

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by