I got different outputs from the trained network
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.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. 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. network output, classification, time series MATLAB Answers — New Questions