qureai/ultrasound-nerve-segmentation-using-torchnet

require(model) not working

Hokie23 opened this issue · 1 comments

Thank you for sharing the code! I am running into a problem with the main.lua.
I am not able to require the unet.lua provided with the install.

hokie23@ubuntu03:/ubuntu/scratch/hokie23/noirb/GRDT2/source$ th main.lua
Setting up data loader using /ubuntu/scratch/hokie23/noirb/GRDT2/train/data.h5
Data loader setup done!
{
savePath : "data/saved_models/"
valSize : 25
dataset : "data"
valDataset :
{
__dataset :
{
load : function: 0x41e4ec40
list : LongTensor - size: 1198
}
__replacement : false
__perm : LongTensor - size: 25
__size : 25
__sampler : function: 0x41c01f48
}
optimMethod : "sgd"
valBatchSize : 32
cvParam : 2
maxepoch : 250
trainSize : 100
trainDataset :
{
__dataset :
{
load : function: 0x412fa9c8
list : LongTensor - size: 4437
}
__replacement : false
__perm : LongTensor - size: 100
__size : 100
__sampler : function: 0x41bdadd8
}
trainBatchSize : 64
model : "models/unet.lua"
}
/home/hokie23/torch/install/bin/luajit: .../hokie23/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/hokie23/.luarocks/share/lua/5.1/models/unet/lua.lua'
no file '/home/hokie23/.luarocks/share/lua/5.1/models/unet/lua/init.lua'
no file '/home/hokie23/torch/install/share/lua/5.1/models/unet/lua.lua'
no file '/home/hokie23/torch/install/share/lua/5.1/models/unet/lua/init.lua'
no file './models/unet/lua.lua'
no file '/home/hokie23/torch/install/share/luajit-2.1.0-alpha/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/hokie23/.luarocks/lib/lua/5.1/models/unet/lua.so'
no file '/home/hokie23/torch/install/lib/lua/5.1/models/unet/lua.so'
no file '/home/hokie23/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/hokie23/.luarocks/lib/lua/5.1/models/unet.so'
no file '/home/hokie23/torch/install/lib/lua/5.1/models/unet.so'
no file '/home/hokie23/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'
.../hokie23/torch/install/share/lua/5.1/trepl/init.lua:384: in function 'require'
...scratch/hokie23/noirb/GRDT2/source/machine.lua:52: in function 'LoadModel'
...scratch/hokie23/noirb/GRDT2/source/machine.lua:34: in function '__init'
.../hokie23/torch/install/share/lua/5.1/torch/init.lua:91: in function <.../hokie23/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'
...alli/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:145: in main chunk
[C]: at 0x00406670

removing the '.lua' extensions in all requires helped.