sherjilozair / char-rnn-tensorflow

Multi-layer Recurrent Neural Networks (LSTM, RNN) for character-level language models in Python using Tensorflow
MIT License
2.64k stars 960 forks source link

Add encoding parameter to TextLoader, default to utf-8. #39

Closed john-parton closed 8 years ago

john-parton commented 8 years ago

Fix for https://github.com/sherjilozair/char-rnn-tensorflow/issues/38

Tested with Python 2.7, but not Python 3.x.

Additional encodings could be supported with an --encoding switch, but I think unicode should work for the vast majority of use-cases.

sherjilozair commented 8 years ago

Thanks @john-parton !

greninja commented 6 years ago

Hi @john-parton! I am using this codebase to run on a jokes dataset. But running 'python train.py' returns the following 'TypeError' : TypeError: lookup() argument 1 must be string, not int. Could you help?

john-parton commented 6 years ago

@greninja What version of the code are you running? What version of python?

My hunch is you're on python2?

greninja commented 6 years ago

Since there are no releases of this repo, I am not sure which version but I am using the most recent code. Yes, I am on python2 (2.7)