How can i use a DLNetwork type Neural Network from Matlab in Simulink?

Hello everyone,
I got a trained Neural Network in form of a DLNetwork in Matlab. For further investigations I want to use this NN in Simulink. At the moment there seems to be no oppertunity to integrate a Neural Network in type of DLNetwork in Simulink. At least I could not find any easy Solution for my Problem. So here is my question: How can I use a DLNetwork type Neural Network from Matlab in Simulink?
I want to define an input in Simulink and the NN should give me the corresponding output in Simulink.

 채택된 답변

Arkadiy Turevskiy
Arkadiy Turevskiy 2021년 12월 15일

0 개 추천

Hello,
You can use Simulink blocks that ship with Deep Learning Toolbox. Please take a look at Deep Learning with Simulink section of documentation.
As of release R2021b we do not support library-free C code generation for dlnetwork, so you should be able to simulate your Simulink model with dlnetwork in it, but you would not be able to generate code from the deep learning block with your dlnetwork.
Do you need code generation or is simulation only acceptable?
HTH,
Arkadiy

댓글 수: 3

Hello,
I have looked in the documentation and for me of interest would be the Predict blocks. But these do not allow DL Network as input. For now the simulation is enough.
Predict block allows use of dlnetwork in R2021b. This is mentioned in documentation for the block.
Otherwise, is there a way to implement an already trained DLNetwork in earlier versions of Simulink? The number of layers, weights, etc. are already defined.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Deep Learning Toolbox에 대해 자세히 알아보기

질문:

2021년 12월 15일

댓글:

2022년 1월 5일

Community Treasure Hunt

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

Start Hunting!

Translated by