how can ı use "minibatch​predict(ne​t,XTest);" command on simulink?

23 vues (au cours des 30 derniers jours)
Bahadir
Bahadir le 29 Sep 2025 à 19:09
Commenté : Walter Roberson il y a environ 13 heures
I trained a LSTM network.
How can I use "scores = minibatchpredict(net,XTest);" and "YPred = predict(net, XTest);" commands on Simulink?

Réponses (1)

AJ Ibraheem
AJ Ibraheem le 6 Oct 2025 à 13:16
Modifié(e) : Walter Roberson le 6 Oct 2025 à 16:32
The 'Stateful Predict' block might be what you're looking for. See https://uk.mathworks.com/help/deeplearning/ref/statefulpredict.html
  3 commentaires
AJ Ibraheem
AJ Ibraheem il y a environ 18 heures
> The results of Stateful Predict is different from minibatchpredict.
Yes it is understandable that you're getting different results. The stateful predict block would update the network states after prediction, to get the same result with the predict block, you'd have to follow [YPred, net.State] = predict(net, XTest) https://uk.mathworks.com/help/deeplearning/ref/dlnetwork.predict.html#d126e73498
> Using a MATLAB function block (as opposed to the Stateful predict block) for neural network prediction is valid.
It is possible that a layer in your network is not supported for the mkldnn target.
Do you mind sharing more about your current setup?

Connectez-vous pour commenter.

Catégories

En savoir plus sur Simulink Coder dans Help Center et File Exchange

Produits


Version

R2024a

Community Treasure Hunt

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

Start Hunting!

Translated by