learning_to_execute
learning_to_execute copied to clipboard
Code fails when batch_size = 1?
when batch_size = 1, backward pass fails
/home/sviyer/torch/install/bin/luajit: bad argument #2 to '?' (out of range) stack traceback: [C]: at 0x7f032f629700 [C]: in function '__index' ...e/sviyer/torch/install/share/lua/5.1/nngraph/gmodule.lua:324: in function 'neteval' ...e/sviyer/torch/install/share/lua/5.1/nngraph/gmodule.lua:348: in function 'updateGradInput' /home/sviyer/torch/install/share/lua/5.1/nn/Module.lua:31: in function 'backward' main.lua:133: in function 'bp' main.lua:150: in function 'opfunc' /home/sviyer/torch/install/share/lua/5.1/optim/sgd.lua:43: in function 'sgd' main.lua:268: in function 'main' main.lua:312: in main chunk [C]: in function 'dofile' ...iyer/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:131: in main chunk [C]: at 0x00406670
is this a bug in the updateGradInput of MaskedLoss?
The MaskedLoss node has two children, so it should return a table of 2 as its gradInput .... unlike a single tensor that it currently returns? It incorrectly uses the second element of the mini_batch right now and thus works for batch_size > 1?
That's not that important use case for me. Feel free to fix if you feel like that. I will accept it.