Skip to content
This repository has been archived by the owner on Jul 18, 2022. It is now read-only.

module 'models/unet.lua' not found:No LuaRocks module found for models/unet.lua #4

Closed
danieleewww opened this issue Aug 5, 2016 · 5 comments

Comments

@danieleewww
Copy link

danieleewww@danielUbuntu1:~/Documents/kaggleUNS/ultrasound-nerve-segmentation-using-torchnet-master$ th main.lua
Setting up data loader using data/train.h5
Data loader setup done!
{
savePath : "data/saved_models/"
valSize : 25
dataset : "train"
valDataset :
{
__dataset :
{
load : function: 0x40d7dc30
list : LongTensor - size: 1198
}
__replacement : false
__perm : LongTensor - size: 25
__size : 25
__sampler : function: 0x407e70b0
}
optimMethod : "sgd"
valBatchSize : 32
cvParam : 2
maxepoch : 250
trainSize : 100
trainDataset :
{
__dataset :
{
load : function: 0x413929d0
list : LongTensor - size: 4437
}
__replacement : false
__perm : LongTensor - size: 100
__size : 100
__sampler : function: 0x41470da8
}
trainBatchSize : 64
model : "models/unet.lua"
}
/home/danieleewww/torch/install/bin/luajit: ...e/danieleewww/torch/install/share/lua/5.1/trepl/init.lua:384: module 'models/unet.lua' not found:No LuaRocks module found for models/unet.lua
no field package.preload['models/unet.lua']
no file '/home/danieleewww/.luarocks/share/lua/5.1/models/unet/lua.lua'
no file '/home/danieleewww/.luarocks/share/lua/5.1/models/unet/lua/init.lua'
no file '/home/danieleewww/torch/install/share/lua/5.1/models/unet/lua.lua'
no file '/home/danieleewww/torch/install/share/lua/5.1/models/unet/lua/init.lua'
no file './models/unet/lua.lua'
no file '/home/danieleewww/torch/install/share/luajit-2.1.0-beta1/models/unet/lua.lua'
no file '/usr/local/share/lua/5.1/models/unet/lua.lua'
no file '/usr/local/share/lua/5.1/models/unet/lua/init.lua'
no file '/home/danieleewww/.luarocks/lib/lua/5.1/models/unet/lua.so'
no file '/home/danieleewww/torch/install/lib/lua/5.1/models/unet/lua.so'
no file '/home/danieleewww/torch/install/lib/models/unet/lua.so'
no file './models/unet/lua.so'
no file '/usr/local/lib/lua/5.1/models/unet/lua.so'
no file '/usr/local/lib/lua/5.1/loadall.so'
no file '/home/danieleewww/.luarocks/lib/lua/5.1/models/unet.so'
no file '/home/danieleewww/torch/install/lib/lua/5.1/models/unet.so'
no file '/home/danieleewww/torch/install/lib/models/unet.so'
no file './models/unet.so'
no file '/usr/local/lib/lua/5.1/models/unet.so'
no file '/usr/local/lib/lua/5.1/loadall.so'
stack traceback:
[C]: in function 'error'
...e/danieleewww/torch/install/share/lua/5.1/trepl/init.lua:384: in function 'require'
...und-nerve-segmentation-using-torchnet-master/machine.lua:52: in function 'LoadModel'
...und-nerve-segmentation-using-torchnet-master/machine.lua:34: in function '__init'
...e/danieleewww/torch/install/share/lua/5.1/torch/init.lua:91: in function <...e/danieleewww/torch/install/share/lua/5.1/torch/init.lua:87>
[C]: in function 'Machine'
main.lua:54: in function 'main'
main.lua:59: in main chunk
[C]: in function 'dofile'
...ewww/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:145: in main chunk
[C]: at 0x00406670

Any suggestion for this?

@chsasank
Copy link
Contributor

chsasank commented Aug 5, 2016

Check out #3

@chsasank chsasank closed this as completed Aug 5, 2016
@danieleewww
Copy link
Author

Taking out .lua extension in all requires for all the .lua files in /ultrasound-nerve-segmentation-using-torchnet-master directory/subdirectory, but the issue "init.lua:384: module 'models/unet.lua' not found:No LuaRocks module found for models/unet.lua" remained. Any suggestion for this!

@shubhamjain0594
Copy link
Contributor

Can you try replacing require 'models/unet.lua' to 'dofile("models/unet.lua"), and let us know the result.

@danieleewww
Copy link
Author

these two lines in main.lua:
cmd:option('-dataset','data/train.h5','Training dataset to be used')
cmd:option('-model','models/unet.lua','Path of the model to be used')
modifed to
cmd:option('-dataset','./data/train.h5','Training dataset to be used')
cmd:option('-model','./models/unet.lua','Path of the model to be used')
fixed my issue.

@axlesor
Copy link

axlesor commented Aug 11, 2016

Thanks danieleewww, that helped me and I also have initialization.lua issue that resolved with
-local MSRInit = require 'models/initialization.lua'
+local MSRInit = require 'models/initialization'
And also commented out the nninit inclusion from the same file:
+-- local nninit = require 'nninit'

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants