Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
xiaofanglegoc opened this issue Jun 16, 2016 · 0 comments
Open

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

xiaofanglegoc opened this issue Jun 16, 2016 · 0 comments

Comments

@xiaofanglegoc
Copy link

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

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

No branches or pull requests

1 participant