spectral-lib icon indicating copy to clipboard operation
spectral-lib copied to clipboard

module 'spectralnet' not found:No LuaRocks module found for spectralnet

Open gravity1989 opened this issue 8 years ago • 4 comments

I cloned the project. And then run th -i train.lua -dataset timit -model fc3 -nhidden 2000 from the test directory.

However, i get this error /home/vivek/torch/install/bin/luajit: /home/vivek/torch/install/share/lua/5.1/trepl/init.lua:383: module 'spectralnet' not found:No LuaRocks module found for spectralnet no field package.preload['spectralnet'] no file '/home/vivek/.luarocks/share/lua/5.1/spectralnet.lua' no file '/home/vivek/.luarocks/share/lua/5.1/spectralnet/init.lua' no file '/home/vivek/torch/install/share/lua/5.1/spectralnet.lua' no file '/home/vivek/torch/install/share/lua/5.1/spectralnet/init.lua' no file './spectralnet.lua' no file '/home/vivek/torch/install/share/luajit-2.1.0-beta1/spectralnet.lua' no file '/usr/local/share/lua/5.1/spectralnet.lua' no file '/usr/local/share/lua/5.1/spectralnet/init.lua' no file '/home/vivek/.luarocks/lib/lua/5.1/spectralnet.so' no file '/home/vivek/torch/install/lib/lua/5.1/spectralnet.so' no file '/home/vivek/torch/install/lib/spectralnet.so' no file './spectralnet.so' no file '/usr/local/lib/lua/5.1/spectralnet.so' no file '/usr/local/lib/lua/5.1/loadall.so' stack traceback: [C]: in function 'error' /home/vivek/torch/install/share/lua/5.1/trepl/init.lua:383: in function 'require' params.lua:8: in main chunk [C]: in function 'dofile' train.lua:1: in main chunk [C]: in function 'dofile' ...ivek/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:145: in main chunk [C]: at 0x00406670

Could you help me solve the problem?

gravity1989 avatar Mar 23 '16 05:03 gravity1989

You have to pack and install the lib before by using the rockspec file present on the root folder.

https://github.com/keplerproject/luarocks/wiki/Creating-a-rock

luarocks install spectralnet-scm-1.rockspec

Conchylicultor avatar Mar 23 '16 12:03 Conchylicultor

This is the error i get on typing the given command.

$ luarocks install spectralnet-scm-1.rockspec Using spectralnet-scm-1.rockspec... switching to 'build' mode

Error: File not found: ..

gravity1989 avatar Mar 23 '16 13:03 gravity1989

On the file spectralnet-scm-1.rockspec, change the line url = "..." --TODO by url = "." or url = "/path/to/spectral-lib"

Conchylicultor avatar Mar 23 '16 14:03 Conchylicultor

Thanks, got it resolved.

gravity1989 avatar Mar 23 '16 15:03 gravity1989