Open Tord-Zhang opened 7 years ago
Hi,
You get this problem because some module in your network returns an empty tensor from the :parameters()
function I think.
You should make sure that you don't return as parameter a tensor that contains nothing.
@mangdian - Were you able to solve this problem. I also wanted to finetune the c3d model ported to torch, but got stuck with this error
@ayushgithub I didn't figure out how to solve this, but for training C3D i have a work around. Define the model in a script and then copy over the weights from the trainable layers. This works for me.
I meet the same problem, maybe you can try to require cunn and cudnn.
@mangdianDear friend, I met the same problem. Did you solve it?
I want to get the parameters the of a model using getParameters(),but some error occures.
error: /torch/install/share/lua/5.1/nn/Module.lua:252: Torch object, table, thread, cdata or function expected stack traceback: [C]: in function 'pointer' ...gteam/NannanLi/torch/install/share/lua/5.1/nn/Module.lua:252: in function 'flatten' ...gteam/NannanLi/torch/install/share/lua/5.1/nn/Module.lua:326: in function 'getParameters' [string "require 'nn';require'cunn';require'cudnn';loc..."]:1: in main chunk [C]: in function 'xpcall' ...team/NannanLi/torch/install/share/lua/5.1/trepl/init.lua:670: in function 'repl' ...anLi/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:199: in main chunk [C]: at 0x004061f0 Could anyone tell me how to fix this?