When sampling a model, whose vocab does not contain a space I get the following error:
Traceback (most recent call last):
File "sample.py", line 46, in <module>
main()
File "sample.py", line 27, in main
sample(args)
File "sample.py", line 43, in sample
args.sample).encode('utf-8'))
File "E:\Projekte\tensorflow\rnn\char-rnn-tensorflow\model.py", line 107, in sample
x[0, 0] = vocab[char]
KeyError: ' '
Simplest test case is that Hello world! works, but Helloworld! dose not.
For future reference, you can simply work around this by specifying manually a prime texte with something adequate (that is, one or more character present in your vocabulary) like:
When sampling a model, whose vocab does not contain a space I get the following error:
Simplest test case is that
Hello world!
works, butHelloworld!
dose not.I'm using tensorflow-gpu on python 3.5.0.