I got different outputs from the trained network
Afficher commentaires plus anciens
Hi all, I already trained a LSTM network and use it to classify the testset. However, the outputs are different when I input the testset samples one by one through for loop and input it as an array. Below is the code:
% Xtest is a 81-1 vector.
% case1: one by one input through for loop
for i = 1:81
testPred_single(i) = classify(LSTM_net,Xtest(i),'SequenceLength','longest');
end
% case2: array input
testPred=classify(LSTM_net,Xtest,'SequenceLength','longest');
Below is the part element of the output variables testPred_single and testPred.

Could anyone explain what causes the gap between this two output variables? Thanks.
2 commentaires
Aquatris
le 10 Juil 2024
I am by no means an expert but my understanding is, as per definition of LSTM, they are not good when the input data is not a sequence. When you give the inputs individually, you basically remove the sequence information. Hence it comes up with a different output.
peng yu
le 11 Juil 2024
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Deep Learning Toolbox dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
