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

37 visualizzazioni (ultimi 30 giorni)
Bahadir
Bahadir il 29 Set 2025 alle 19:09
Commentato: Bahadir il 8 Ott 2025 alle 19:02
I trained a LSTM network.
How can I use "scores = minibatchpredict(net,XTest);" and "YPred = predict(net, XTest);" commands on Simulink?

Risposte (1)

AJ Ibraheem
AJ Ibraheem il 6 Ott 2025 alle 13:16
Modificato: Walter Roberson il 6 Ott 2025 alle 16:32
The 'Stateful Predict' block might be what you're looking for. See https://uk.mathworks.com/help/deeplearning/ref/statefulpredict.html
  4 Commenti
Bahadir
Bahadir il 8 Ott 2025 alle 19:02
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

Accedi per commentare.

Prodotti


Release

R2024a

Community Treasure Hunt

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

Start Hunting!

Translated by