jcjohnson / neural-style

Torch implementation of neural style algorithm
MIT License
18.3k stars 2.71k forks source link

Cuda9 and cudnn7 error with MSECriterion #470

Open ajhool opened 5 years ago

ajhool commented 5 years ago

I'm seeing the following showstopper error on ubuntu16.04 with cuda9 and cudnn7, does anybody have any ideas?

/root/torch/install/bin/luajit: /root/torch/install/share/lua/5.1/nn/Container.lua:67:
In 4 module of nn.Sequential:
/root/torch/install/share/lua/5.1/nn/THNN.lua:110: input and target have different number of elements: input[64 x 64] has 4096 elements, while target[] has 0 elements at /tmp/luarocks_cunn-scm-1-5152/cunn/lib/THCUNN/generic/MSECriterion.cu:12
stack traceback:
[C]: in function 'v'
/root/torch/install/share/lua/5.1/nn/THNN.lua:110: in function 'MSECriterion_updateOutput'
/root/torch/install/share/lua/5.1/nn/MSECriterion.lua:14: in function 'forward'
scripts/neural_style.lua:593: in function <scripts/neural_style.lua:581>
[C]: in function 'xpcall'
/root/torch/install/share/lua/5.1/nn/Container.lua:63: in function 'rethrowErrors'
/root/torch/install/share/lua/5.1/nn/Sequential.lua:44: in function 'forward'
scripts/neural_style.lua:267: in function 'main'