Error deploying DNN "Unable to resolve the name coder.inte​rnal.loadD​eepLearnin​gNetwork."

24 次查看(过去 30 天)
Hello,
I am having an error after compiling an app that content a compiled mex file. I compile a dnn function to GPU mex to increase speed of the deep neural network. Then I compile the application to .exe.
function [categ, score] = classifydnn(resized_cropped_img)
persistent net;
if isempty(net)
net = coder.loadDeepLearningNetwork('resnet50_0830.mat','net');
end
[categ, score] = classify(net, resized_cropped_img,'ExecutionEnvironment','gpu');
end
But I am having the error
"Unable to resolve the name coder.internal.loadDeepLearningNetwork."
How can I solve this, what I am forgetting to do?
Thanks

回答(1 个)

Shashank Gupta
Shashank Gupta 2020-10-14
Hey Wilmer,
The error looks more like an installation package problem, Have you downloaded the required GPU coder packages needed for this function to work. Type "ver" in command line of MATLAB, it will give you the toolboxes you have installed, look for the required toolbox for this function to work. I suspect this has to do with package installation.
Cheers.
  1 个评论
Wilmer Ariza
Wilmer Ariza 2020-10-14
Hello,
Thanks for the help
The ver command give me this
-----------------------------------------------------------------------------------------------------
MATLAB Version: 9.9.0.1467703 (R2020b)
MATLAB License Number: 1109990
Operating System: Microsoft Windows 10 Pro Version 10.0 (Build 18363)
Java Version: Java 1.8.0_202-b08 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode
-----------------------------------------------------------------------------------------------------
MATLAB Version 9.9 (R2020b)
Simulink Version 10.2 (R2020b)
Computer Vision Toolbox Version 9.3 (R2020b)
Database Toolbox Version 10.0 (R2020b)
Deep Learning Toolbox Version 14.1 (R2020b)
GPU Coder Version 2.0 (R2020b)
Image Acquisition Toolbox Version 6.3 (R2020b)
Image Processing Toolbox Version 11.2 (R2020b)
MATLAB Coder Version 5.1 (R2020b)
MATLAB Compiler Version 8.1 (R2020b)
Parallel Computing Toolbox Version 7.3 (R2020b)
Statistics and Machine Learning Toolbox Version 12.0 (R2020b)
Symbolic Math Toolbox Version 8.6 (R2020b)
After this I run the setup verification and I get:
gpuEnvObj = coder.gpuEnvConfig;
gpuEnvObj.BasicCodegen = 1;
gpuEnvObj.BasicCodeexec = 1;
gpuEnvObj.DeepLibTarget = 'tensorrt';
gpuEnvObj.DeepCodeexec = 1;
gpuEnvObj.DeepCodegen = 1;
results = coder.checkGpuInstall(gpuEnvObj)
Compatible GPU : PASSED
CUDA Environment : PASSED
Runtime : PASSED
cuFFT : PASSED
cuSOLVER : PASSED
cuBLAS : PASSED
cuDNN Environment : PASSED
TensorRT Environment : FAILED (Unable to find the 'NVIDIA_TENSORRT' environment variable. Set 'NVIDIA_TENSORRT' to point to the root directory of a TensorRT installation.)
Basic Code Generation : PASSED
Basic Code Execution : PASSED
results =
struct with fields:
gpu: 1
cuda: 1
cudnn: 1
tensorrt: 0
basiccodegen: 1
basiccodeexec: 1
deepcodegen: 0
deepcodeexec: 0
tensorrtdatatype: 0
profiling: 0
I dont know if the 0 in deepcodegen is the problem?

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Deep Learning Toolbox 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by