Effacer les filtres
Effacer les filtres

how to use the parameters of neural network in simulink?

111 vues (au cours des 30 derniers jours)
Ahmad Al-Issa
Ahmad Al-Issa le 6 Juil 2024 à 16:15
Commenté : Ahmad Al-Issa le 9 Juil 2024 à 9:59
Hello all, @Sam Chak @Stephen23 @Paul
I trained a neural network dpending on two inputs (T and p) to predect density.
Now I have the best parameters to predect density using this code:
density = model (parameters, p, T);
Plese note that I have a simulink model with the time-step is 0.001 s, the problem is how to use this parameters of the NN in the Simulink model.
input are: p and T
output is: density
time-step is 0.001
Best regards, Ahmad
  3 commentaires
Ahmad Al-Issa
Ahmad Al-Issa le 6 Juil 2024 à 19:13
Thanks @Paul
Ahmad Al-Issa
Ahmad Al-Issa le 7 Juil 2024 à 13:25
Hello @TAB
can please you solve this problem?

Connectez-vous pour commenter.

Réponses (1)

Sam Chak
Sam Chak le 7 Juil 2024 à 6:55
If you want to implement a trained neural network in Simulink to predict the Desity based on two inputs (p, T), then use the Predict block.
  12 commentaires
Sam Chak
Sam Chak le 8 Juil 2024 à 9:35
Hi Ahmad,
Thanks for your update. This error message is strange because the fullyconnect() function is supported in the MATLAB Function block according to the list below. Will need some time to figure this out.
Ahmad Al-Issa
Ahmad Al-Issa le 9 Juil 2024 à 9:59
Hello @Sam Chak
Thank you for assistent me.
The problems as follow:
1- the matlab function block does not work with dlarray
2- fullyconnect generate data in dlarray
3- Sigmoid function generate data in dlarray
The solution is to reproduce all (weights and bias) in double array
not using fullyconnect but writing code of matrix insteade.
not using Sigmoid function but writing the equation of it insteade.
Best regards, Ahmad

Connectez-vous pour commenter.

Catégories

En savoir plus sur Deep Learning Toolbox dans Help Center et File Exchange

Tags

Produits


Version

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by