jcjohnson / torch-rnn

Efficient, reusable RNNs and LSTMs for torch

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error running train.lua bad argument #2 to '?'

its5Q opened this issue · comments

commented

Running in CPU mode
/home/neuralnet/torch/install/bin/luajit: bad argument #2 to '?' (end index out of bound at /home/neuralnet/torch/pkg/torch/generic/Tensor.c:992)
stack traceback:
[C]: at 0x7f26723e9ff0
[C]: in function '__index'
./util/DataLoader.lua:35: in function '__init'
/home/neuralnet/torch/install/share/lua/5.1/torch/init.lua:91: in function </home/neuralnet/torch/install/share/lua/5.1/torch/init.lua:87>
[C]: in function 'DataLoader'
train.lua:76: in main chunk
[C]: in function 'dofile'
...lnet/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:150: in main chunk
[C]: at 0x00405d50

Thats what i get when running train.lua with command
th train.lua -input_h5 my_data.h5 -input_json my_data.json -gpu -1

Looks like you might be trying to run with a small dataset and hitting #135. Either get more data, make test and validation splits larger when preprocessing, decrease seq_length and/or batch_size or try #195.

commented

Thanks a lot! I tried reinstalling torch and nothing happened. Your answer helped.

my error is : start index out of bound. what should i do?