cnncomplete icon indicating copy to clipboard operation
cnncomplete copied to clipboard

Error when running model:forward()

Open vividaner opened this issue 7 years ago • 1 comments

Hi, Thanks a lot for this great code!

I meet a problem when I tried to run the test code.

First, I am not sure what is the difference between 'train.lua' and 'train_class.lua' and the difference between the trained_models between 'epn-unet.net' and 'epn-unet-class.net'. Since I found there is no file "classifier-partial.net" which is required in train_class.lua, I run the -th train.lua instead.

However, I got an error after loading the first data as follow: /home/dan/torch/install/bin/luajit: /home/dan/torch/install/share/lua/5.1/nngraph/gmodule.lua:311: expecting table of 2 inputs stack traceback: [C]: in function 'error' /home/dan/torch/install/share/lua/5.1/nngraph/gmodule.lua:311: in function 'forward' train.lua:202: in function 'test_batch' train.lua:171: in function 'test' train.lua:218: in main chunk [C]: in function 'dofile' .../dan/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:150: in main chunk [C]: at 0x00405d50

I think this error come out from here: output = model:forward(inputs)

I am a newbie and not sure whether anything wrong about the model structure. Could you please help me to check this problem. Thanks in advance!

vividaner avatar May 06 '17 02:05 vividaner

Sorry, I just found that I forgot to change the '-model epn-unet-class' as '-model epn-unet' when running the 'train.lua'. It works for the 'train.lua' now.

However, what is the difference between 'train.lua' and 'train-class.lua'? I guess that 'train-class.lua' trains a network with 3D classification like the figure 1 shown in the paper, but 'train.lua' training a network without 3D classification. Is that correct? In that case, could you provide a the 'classifier-partial.net' trained model. Thanks in advance!

vividaner avatar May 08 '17 21:05 vividaner