torch / demos

Demos and tutorials around Torch7.
355 stars 301 forks source link

bad argument passed to resizeAs in funtion forward line:84 #28

Closed sowjanya143 closed 8 years ago

sowjanya143 commented 8 years ago

/usr/local/share/lua/5.1/nn/CSubTable.lua:10: bad argument #1 to 'resizeAs' (torch.FloatTensor expected, got torch.DoubleTensor) stack traceback: [C]: in function 'resizeAs' /usr/local/share/lua/5.1/nn/CSubTable.lua:10: in function 'updateOutput' ...cal/share/lua/5.1/nn/SpatialSubtractiveNormalization.lua:89: in function 'updateOutput' /usr/local/share/lua/5.1/nn/Sequential.lua:44: in function 'forward' ...cal/share/lua/5.1/nn/SpatialContrastiveNormalization.lua:29: in function 'forward' data.lua:184: in main chunk

soumith commented 8 years ago

this is not very helpful. you haven't given us info on which demo you tried to run when you saw this error.

sowjanya143 commented 8 years ago

I got this error while working with train face detector system data.lua file. I am executing it in zbstudio with Qlua-Luajit Interpreter in debugging mode.

jhmapoorva commented 8 years ago

Include torch.setdefaulttensortype("torch.FloatTensor") before defining the torch.Tensor in data.lua