torch-rnn icon indicating copy to clipboard operation
torch-rnn copied to clipboard

Sampling fails at random times giving the following error

Open keerthiskating opened this issue 8 years ago • 4 comments

/home/mcw/torch/install/bin/luajit: bad argument #2 to '?' (end index out of bound at /tmp/luarocks_torch-scm-1-6786/torch7/generic/Tensor.c:969)
stack traceback:
    [C]: at 0x7faf2f62aa20
    [C]: in function '__index'
    ./LanguageModel.lua:176: in function 'sample'
    sample.lua:41: in main chunk
    [C]: in function 'dofile'
    .../mcw/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:131: in main chunk
    [C]: at 0x00406670

keerthiskating avatar May 11 '16 12:05 keerthiskating

What's your OS and version?

insanity54 avatar Jun 11 '16 06:06 insanity54

I'm getting this same error. I'm using -gpu -1 since I don't have an acceptable gpu but I'm not 100% sure that flag is the problem.

I'm using Gentoo I've managed to get everything to compile and have worked past all the errors until I got to this.

TheOncomingStorm avatar Oct 26 '16 02:10 TheOncomingStorm

This is happening again in #135, except in that issue, the error happens right when training is started (Or attempted). There doesn't appear to be any correlation between the error and CPU-only mode, as one user who commented was running in GPU mode with CUDA. It also doesn't seem to happen for everyone, because I have been running in CPU-only mode for a while today and have had no problems.

I will try both modes (Or all three -- CPU, GPU with CUDA, and GPU with OpenCL) and see if I can reproduce the issue. In the meantime, like the label on #135 says, this is a bug.

one-new-message avatar May 29 '17 02:05 one-new-message

I believe this issue is caused by using -length smaller than length of -start_text, so it's unrelated to #135.

antihutka avatar May 29 '17 02:05 antihutka