soumith / imagenet-multiGPU.torch

an imagenet example in torch.
BSD 2-Clause "Simplified" License
401 stars 158 forks source link

issue with clearState #54

Closed mrastegari closed 8 years ago

mrastegari commented 8 years ago

following this simple code I will get an error:

mm = nn.Sequential():add(cudnn.SpatialConvolution(3, 96, 11,11,4,4,2,2)):cuda() x = torch.rand(2,3,224,224):cuda() mm:forward(x); mm:clearState(); mm:forward(x);

...torch/install/share/lua/5.1/cudnn/SpatialConvolution.lua:386: attempt to perform arithmetic on a nil value stack traceback: ...torch/install/share/lua/5.1/cudnn/SpatialConvolution.lua:386: in function 'updateOutput' .../mohammadr/torch/install/share/lua/5.1/nn/Sequential.lua:44: in function 'forward' [string "mm:forward(x);"]:1: in main chunk [C]: in function 'xpcall' /home/mohammadr/torch/install/share/lua/5.1/trepl/init.lua:669: in function 'repl' ...madr/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:199: in main chunk [C]: at 0x00406670

szagoruyko commented 8 years ago

luarocks update cudnn

sidharthms commented 8 years ago

I am still seeing this issue in TemporalConvolution. Has it been fixed there, or is it a known problem?