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

I'm always getting the same error

Open lowtronik opened this issue 7 years ago • 9 comments

After the data are prepaired i get this , with the tinyshakespeare data or my data

// /luajit: bad argument #2 to '?' (start index out of bound at /... /generic/Tensor.c:984

lowtronik avatar Sep 17 '17 08:09 lowtronik

Also, when i run your Bipolar Activation Functions parameters , right after the 'cloning rnn' ,'cloning criterion' i get:

/luajit: train.lua:409: attempt to call method resize (a nil value)

traceback train.lua:409: in function 'opfunc' ........ [ c] : in function 'dofile'

lowtronik avatar Sep 17 '17 09:09 lowtronik

Seems to be related to https://github.com/jcjohnson/torch-rnn/pull/195

bloons3 avatar Sep 18 '17 03:09 bloons3

I have this issue, too, on a mac and on an AWS instance:

// /luajit: bad argument #2 to '?' (start index out of bound at /... /generic/Tensor.c:984

It looks like the same error as https://github.com/jcjohnson/torch-rnn/pull/195 as @bloons3 mentioned. However, it doesn't seem to be related to using a smaller dataset (unless the requirements have changed) because as @lowtronik points out, it occurs with the tinyshakespeare dataset that has worked for previous versions of word-rnn.

janelleshane avatar Oct 08 '17 02:10 janelleshane

Same, and also get it with tinyshakespeare and other data sets that should be plenty large.

Happens in CPU and GPU mode.

JonathanFly avatar Oct 21 '17 08:10 JonathanFly

If you install the Feb. 28 commit instead of the most recent one, it works:

git clone https://github.com/larspars/word-rnn/tree/9595045b2cf0cfef519953ca6f051d1713b07648
luarocks install underscore.lua --from=http://marcusirven.s3.amazonaws.com/rocks/
luarocks install lrexlib-pcre

janelleshane avatar Oct 21 '17 16:10 janelleshane

Is there any new update on this issue? I still got the same error...

@janelleshane This old version of codes worked for the data/tinyshakespeare date, but why? Is there any difference other than this issue between the Feb 28 repository and the current one?

jenniferzhu avatar Jan 03 '18 21:01 jenniferzhu

Hello everyone.. was getting this same problem myself.

Did some digging in the source code.. error was occurring in CharSplitLMMinibatchLoader.lua. Error happened because none of the data was being set aside for a test fraction by default (train_frac was set to 0.95, val_frac to 0.05).

Changing the -train_frac flag to 0.9 fixed the problem (sets aside 90% for training, 5 for validation, 5 for testing).

Being an rnn noob.. I don't entirely know what this means, but it fixed the problem for me!

nalden01 avatar Feb 14 '18 20:02 nalden01

Thank you nalden01! That fixed it for me.

Senso avatar Feb 28 '18 03:02 Senso

@nalden01 hello i'd like to ask you for this problem, i'm new to lua and torch, so how do i set my code to avoid this issue from happening?

medori233 avatar Jul 03 '18 08:07 medori233