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

18 vues (au cours des 30 derniers jours)
Bahadir
Bahadir le 29 Sep 2025
Commenté : Bahadir le 8 Oct 2025
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
Modifié(e) : Walter Roberson le 6 Oct 2025
The 'Stateful Predict' block might be what you're looking for. See https://uk.mathworks.com/help/deeplearning/ref/statefulpredict.html
  4 commentaires
Bahadir
Bahadir le 8 Oct 2025
Thank you for your answer.
could you give more detail information about how to get same result on simulink. How to use predict command at matlab function block on simulink.
function y= fnc(u)
persistent net
if isempty(net)
net = coder.loadDeepLearningNetwork('32.mat');
end
input= [u];
input=rescale(input);
XTrain = {input'};
output= predict(net, XTrain);
y=output{1};
end

Connectez-vous pour commenter.

Produits


Version

R2024a

Community Treasure Hunt

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

Start Hunting!

Translated by