char-rnn-tensorflow icon indicating copy to clipboard operation
char-rnn-tensorflow copied to clipboard

create_batches() from utils.py throws error

Open ghost opened this issue 9 years ago • 4 comments

root@ip-172-31-23-174:/home/ubuntu/char-rnn# python train.py I tensorflow/stream_executor/dso_loader.cc:105] successfully opened CUDA library libcublas.so locally I tensorflow/stream_executor/dso_loader.cc:105] successfully opened CUDA library libcudnn.so locally I tensorflow/stream_executor/dso_loader.cc:105] successfully opened CUDA library libcufft.so locally I tensorflow/stream_executor/dso_loader.cc:105] successfully opened CUDA library libcuda.so.1 locally I tensorflow/stream_executor/dso_loader.cc:105] successfully opened CUDA library libcurand.so locally loading preprocessed files Traceback (most recent call last): File "train.py", line 75, in main() File "train.py", line 39, in main train(args) File "train.py", line 42, in train data_loader = TextLoader(args.data_dir, args.batch_size, args.seq_length) File "/home/ubuntu/char-rnn/utils.py", line 22, in init self.create_batches() File "/home/ubuntu/char-rnn/utils.py", line 52, in create_batches ydata[-1] = xdata[0] IndexError: index 0 is out of bounds for axis 0 with size 0

ghost avatar Feb 23 '16 19:02 ghost

This happend when self.tensor.size is less than (self.batch_size * self.seq_length). You can avoid that by either reducing sec_lenght or batch_size or increasing the amount of input data.

pajowu avatar Apr 01 '16 22:04 pajowu

I put pr #25. Let me know this can solve your issue.

hunkim avatar Apr 28 '16 13:04 hunkim

@thecerial PR #25 is merged, can this be closed?

hugovk avatar Jan 13 '17 06:01 hugovk

Sure.

On Fri, Jan 13, 2017 at 7:30 AM, Hugo [email protected] wrote:

@thecerial https://github.com/thecerial PR #25 https://github.com/sherjilozair/char-rnn-tensorflow/pull/25 is merged, can this be closed?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/sherjilozair/char-rnn-tensorflow/issues/11#issuecomment-272371485, or mute the thread https://github.com/notifications/unsubscribe-auth/AA3DV8hgw5kcHjC9TaEawVjKumRDqYowks5rRxn1gaJpZM4Hg-cd .

hunkim avatar Jan 13 '17 15:01 hunkim