I want to make a prediction from a trained neural network and have the prediction displayed on a display block

6 次查看(过去 30 天)

I am doing a school project using Neural networks to predict faults, I have already trained the neural network, but I am finding it difficult to use the trained model directly on simulink, using the predict blocks. I was able to use script to extract the data and make prediction and display on the workspace, but I want everything to run directly from simulink

回答(1 个)

Krishna
Krishna 2025-1-28
Hi Olalekan,
I understand that you are facing problems in converting your neural network into a Simulink model.
I assume that you are using the latest dlnetwork object provided in MATLAB to train your Neural Network. To know more about how to use ‘dlnetwork’ please look at this documentation on how to train simple Neural Networks using 'dlnetwork.'
If you want to convert your dlnetwork to a Simulink block you can use the function given below provided by the Layers library in Simulink,
exportNetworkToSimulink(dlnetwork)
This will generate a Simulink block which you can further use in your Simulink model. To display the output of the network you can use a scope or a display block connected as output to this model.
Please look at the below documentation to know more regarding this,
Hope this helps.
  7 个评论

请先登录,再进行评论。

类别

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

产品


版本

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by