Target language problem with coder.loadDeepLearningNetwork in Simulink
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Hi everyone,
I am trying to implement a YOLO network in Simulink. For my first project, I used the YOLOV2ObjectDetectionUsingIntelMKLDNNExample. Running & experimenting with the example in Matlab works like charm. But when I try to run the yolov2_detection function in a Matlab Function Block in Simulink, I get a compiler error:
Target selection language property on Code Generation configuration was not set to C++. Simulation with deep learning network requires target language to be set to C++.
Changing the default mex compiler to cpp by using mex -setup cpp (MEX configured to use 'Microsoft Visual C++ 2017' for C++ language compilation.) didn't resolve the problem. Do I have to change the target language somewhere else? Is there another compiler? I would be thankful for any insights!
Minimal code example to reproduce the error (using the files in MATLAB\Examples\R2020a\deeplearning_shared\YOLOV2ObjectDetectionUsingIntelMKLDNNExample)
function out_img = run_yolo(img)
persistent yolov2Obj;
if isempty(yolov2Obj)
yolov2Obj = coder.loadDeepLearningNetwork('yolov2ResNet50VehicleExample.mat');
end
out_img = img
Specs:
- Window10 System
- Using Matlab2020A with the Deeplearning Toolbox
- No Matlab Coder available
2 comentarios
Martin Boehme
el 23 de Feb. de 2021
The problem can be fixed. The following post solved the issue: https://www.mathworks.com/matlabcentral/answers/447387-matlab-coder-how-do-i-build-the-intel-mkl-dnn-library-for-deep-learning-c-code-generation-and-dep
Respuestas (0)
Ver también
Categorías
Más información sobre Simulink Coder en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!