word-rnn-tensorflow
word-rnn-tensorflow copied to clipboard
IndexError: list index out of range at pred = words[sample]
Cannot reproduce it anymore, but for the record:
hunkim:~/word-rnn-tensorflow$ python sample.py --prime="kmalloc"
kmalloc
Traceback (most recent call last):
File "sample.py", line 42, in <module>
main()
File "sample.py", line 25, in main
sample(args)
File "sample.py", line 39, in sample
print(model.sample(sess, words, vocab, args.n, args.prime, args.sample))
File "/home/hunkim/word-rnn-tensorflow/model.py", line 97, in sample
pred = words[sample]
IndexError: list index out of range
Could there be something wrong with the format of the lines in the words_vocab.pkl file?like empty lines?
@sunxiaobiu Could you reproduce this error?