I want to make a prediction from a trained neural network and have the prediction displayed on a display block
5 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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
0 Kommentare
Antworten (1)
Krishna
am 28 Jan. 2025
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 Kommentare
Walter Roberson
am 29 Jan. 2025
In that case, exportNetworkToSimulink did not exist yet.
As far as I know your only option is to upgrade MATLAB versions.
Siehe auch
Kategorien
Mehr zu Deep Learning Toolbox finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!