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

3 ビュー (過去 30 日間)
Kchung
Kchung 2020 年 8 月 6 日
コメント済み: Martin Boehme 2021 年 2 月 23 日
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

回答 (0 件)

カテゴリ

Help Center および File ExchangeSimulink Coder についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by