THNN.lua:110: input and gradOutput shapes do not match: input [90 x 271], gradOutput [271]

184 Views Asked by At

I have a torch code that can run ok on one machine but with the error "THNN.lua:110: input and gradOutput shapes do not match: input [90 x 271], gradOutput [271]" on another machine. The data is same. I think is the version problem. But i don't know how to fix it. Any help?

The problem refers to backward of logsoftmax module. But when I print the shape, there is no problem.

   tack traceback:
      [C]: in function 'v'
    /root/torch/install/share/lua/5.1/nn/THNN.lua:110: in function     'LogSoftMax_updateGradInput'
     /root/torch/install/share/lua/5.1/nn/LogSoftMax.lua:12: in function 'updateGradInput'
     /root/torch/install/share/lua/5.1/nngraph/gmodule.lua:420: in function 'neteval'
     /root/torch/install/share/lua/5.1/nngraph/gmodule.lua:454: in function 'updateGradInput'
0

There are 0 best solutions below