dp
dp copied to clipboard
Using dp.Confusion
I'm having trouble using the Confusion module. I'm following the RAM example in the rnn package, and the only difference is that my output is of the form batchLen x seqLen x numClasses (as opposed to the RAM example which is simply batchLen x numClasses). I'm currently working with a seqLen of 4, and when i try to use a dp.Confusion{ nn.SelectTable(1) } for the feedback parameter, I get the following error:
==> epoch # 1 for optimizer :
/home/sid/torch/install/bin/luajit: bad argument #2 to '?' (out of range at /tmp/luarocks_torch-scm-1-4568/torch7/generic/Tensor.c:890)
stack traceback:
[C]: at 0x7fa33bd88980
[C]: in function '__index'
...id/torch/install/share/lua/5.1/optim/ConfusionMatrix.lua:42: in function '_add'
...id/torch/install/share/lua/5.1/optim/ConfusionMatrix.lua:106: in function 'batchAdd'
...id/torch/install/share/lua/5.1/dp/feedback/confusion.lua:83: in function '_add'
...sid/torch/install/share/lua/5.1/dp/feedback/feedback.lua:63: in function 'add'
...torch/install/share/lua/5.1/dp/propagator/propagator.lua:175: in function 'monitor'
.../torch/install/share/lua/5.1/dp/propagator/optimizer.lua:51: in function 'propagateBatch'
...torch/install/share/lua/5.1/dp/propagator/propagator.lua:127: in function 'propagateEpoch'
...torch/install/share/lua/5.1/dp/propagator/experiment.lua:110: in function 'run'
recurrent-visual-attention.lua:310: in main chunk
[C]: in function 'dofile'
.../sid/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:145: in main chunk
[C]: at 0x00406670