neural-style icon indicating copy to clipboard operation
neural-style copied to clipboard

module 'nn' not found

Open saeid1 opened this issue 6 years ago • 5 comments

hi can you please help me i have flowing error
$ th neural_style.lua -gpu -1 -print_iter 1 /usr/bin/luajit: /usr/share/lua/5.1/trepl/init.lua:389: module 'nn' not found: no field package.preload['nn'] no file './nn.lua' no file '/usr/share/luajit-2.1.0-beta3/nn.lua' no file '/usr/local/share/lua/5.1/nn.lua' no file '/usr/local/share/lua/5.1/nn/init.lua' no file '/usr/share/lua/5.1/nn.lua' no file '/usr/share/lua/5.1/nn/init.lua' no file './nn.so' no file '/usr/local/lib/lua/5.1/nn.so' no file '/usr/lib/x86_64-linux-gnu/lua/5.1/nn.so' no file '/usr/local/lib/lua/5.1/loadall.so' stack traceback: [C]: in function 'error' /usr/share/lua/5.1/trepl/init.lua:389: in function 'require' neural_style.lua:2: in main chunk [C]: in function 'dofile' /usr/lib/torch-trepl/th:149: in main chunk [C]: at 0x556accec81d0

saeid1 avatar Dec 14 '18 14:12 saeid1

try luarocks install nn

ajhool avatar Jan 26 '19 04:01 ajhool

exactly! plain installation with luarocks should work, highly likely, in my opinion

AndreV84 avatar Apr 09 '19 05:04 AndreV84

hi can you please help me i have flowing error $ th neural_style.lua -gpu -1 -print_iter 1 /usr/bin/luajit: /usr/share/lua/5.1/trepl/init.lua:389: module 'nn' not found: no field package.preload['nn'] no file './nn.lua' no file '/usr/share/luajit-2.1.0-beta3/nn.lua' no file '/usr/local/share/lua/5.1/nn.lua' no file '/usr/local/share/lua/5.1/nn/init.lua' no file '/usr/share/lua/5.1/nn.lua' no file '/usr/share/lua/5.1/nn/init.lua' no file './nn.so' no file '/usr/local/lib/lua/5.1/nn.so' no file '/usr/lib/x86_64-linux-gnu/lua/5.1/nn.so' no file '/usr/local/lib/lua/5.1/loadall.so' stack traceback: [C]: in function 'error' /usr/share/lua/5.1/trepl/init.lua:389: in function 'require' neural_style.lua:2: in main chunk [C]: in function 'dofile' /usr/lib/torch-trepl/th:149: in main chunk [C]: at 0x556accec81d0

I also encountered this problem. Can you solve this problem?

fuxiao567 avatar Sep 24 '19 07:09 fuxiao567

sudo luarocks install nn

Installing https://luarocks.org/nn-1.0.5-1.src.rock
gcc -O2 -fPIC -I/usr/include/lua5.1 -c lnn.c -o lnn.o
lnn.c:4:9: fatal error: nanomsg/nn.h: No such file or directory
 #include<nanomsg/nn.h>
         ^~~~~~~~~~~~~~
compilation terminated.

Error: Build error: Failed compiling object lnn.o

sudo apt-get install libnanomsg-dev helped.

mrgloom avatar Nov 04 '19 18:11 mrgloom

luarocks install torch && luarocks install nn source https://github.com/torch/nn/issues/1214

AndreV84 avatar Nov 04 '19 20:11 AndreV84