Target language problem with coder.load​DeepLearni​ngNetwork in Simulink

3 visualizaciones (últimos 30 días)
Kchung
Kchung el 6 de Ag. de 2020
Comentada: Martin Boehme el 23 de Feb. de 2021
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

Respuestas (0)

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!

Translated by