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

29 Ansichten (letzte 30 Tage)
Bahadir
Bahadir am 29 Sep. 2025 um 19:09
Kommentiert: Bahadir am 8 Okt. 2025 um 19:02
I trained a LSTM network.
How can I use "scores = minibatchpredict(net,XTest);" and "YPred = predict(net, XTest);" commands on Simulink?

Antworten (1)

AJ Ibraheem
AJ Ibraheem am 6 Okt. 2025 um 13:16
Bearbeitet: Walter Roberson am 6 Okt. 2025 um 16:32
The 'Stateful Predict' block might be what you're looking for. See https://uk.mathworks.com/help/deeplearning/ref/statefulpredict.html
  4 Kommentare
Bahadir
Bahadir am 8 Okt. 2025 um 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

Melden Sie sich an, um zu kommentieren.

Produkte


Version

R2024a

Community Treasure Hunt

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

Start Hunting!

Translated by