TripletNet icon indicating copy to clipboard operation
TripletNet copied to clipboard

Data.lua:164: attempt to get length of a nil value

Open xiaofanglegoc opened this issue 8 years ago • 0 comments

Hi,

I have a bug when I run the code according to the instructions. The detail of implementing is as follows:

wang@Apocalypse02:/raid5/wang/TripletNet$ th Main.lua -dataset Cifar10 -LR 0.1 -save new_exp_dir nClasses= 11 11
c[j]= 1

Ordered= 11

/home/wang/torch/install/bin/luajit: ./Data.lua:164: attempt to get length of a nil value stack traceback: ./Data.lua:164: in function 'ReGenerateTrain' Main.lua:92: in main chunk [C]: in function 'dofile' ...wang/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:145: in main chunk [C]: at 0x00406670

It seems that the variant #Ordered is a scalar instead of a vector which could be visited by #Ordered[c[j]]

Thanks very much

xiaofanglegoc avatar Jun 16 '16 09:06 xiaofanglegoc