this is my code:
30 for t = 1,testData:size() do
33 -- get new sample
34 local input = testData.data[t]
35 if opt.type == 'double' then input = input:double()
36 elseif opt.type == 'cuda' then input = input:cuda() end
37 local target = testData.labels[t]
38 -- test sample
39 local pred = model:forward(input)
40 test_result[t]=pred
41
42 local err = criterion:forward(pred,target)
43 te_error = te_error+err
44 end
45 print(test_result[1])
46 print(test_result[2])
and I get the same elements, so my table only have stored the last element, why?
model:forwardreturning? Is it returning a static table? I assume you are saying you get the same value for all entries intest_resultand not just that those two are the same (since without knowing the data it is certainly possible for those two to legitimately be the same I would think).testData.data[t]betestData[t].data?