Closed evgen48 closed 8 years ago
Hi @evgen48 Apologies for that, there was a bug in the evaluation code. I've corrected it now, so please check the update, and let me know if this runs fine. cheers.
Thanks @viorik , now it works. Ideally i would also move opt.train = true into opts-mnist.lua file, i can provide pull request for that kind of refactoring
That is a minor detail, it actually used to be in opts-mnist file, but I moved it in main for commodity. Glad that the issue is solved.
Hi @viorik I'm trying to apply trained model, and got folowing errors.
I narrowed down, that in evaluation phase you are loading 19 images from database to
inputTable
And one remained image to targetTensor
target:resizeAs(data[1]):copy(data[data:size(1)])
That is different from what is done in learning phase, and thus criterion:update output, that would like to iterate overtables, noticed that second arg is not a vector it report off-by-one error. I dont have enough expertise currently to suggest a fix, thus i would like to hear from you. I think idea was to get an error score by loading 19 pictures to a model , and then do a prediction, and compare to 20th one, however cannot fix it myself.
I have modified sources, so line numbers are not correct, the problem is here torch/install/share/lua/5.1/rnn/SequencerCriterion.lua: SequencerCriterion:updateOutput self.output = self.output + criterion:forward(input, targetTable[i]) Where target table has size=1
Please help.