bad argument passed to resizeAs in funtion forward line:84
sowjanya143 opened this issue · 3 comments
/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
this is not very helpful. you haven't given us info on which demo you tried to run when you saw this error.
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.
Include
torch.setdefaulttensortype("torch.FloatTensor")
before defining the torch.Tensor in data.lua