karpathy / char-rnn

Multi-layer Recurrent Neural Networks (LSTM, GRU, RNN) for character-level language models in Torch
11.52k stars 2.58k forks source link

Length of primetext causes it to fail #218

Open cjsweeney opened 5 years ago

cjsweeney commented 5 years ago

Hi, The model works wonderfully for primetext up to a certain length, after which it produces this error:

lua: bad argument #1 to '?' (empty tensor at /tmp/luarocks_torch-scm-1-oGU5EX/torch7/generic/Tensor.c:911) stack traceback:

[C]: ?
./sample.lua:116: in main chunk
[C]: ?
[C]: ?

Is there a way to make any length primetext work for seeding the model?