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

Refactor to use state_is_tuple=True #51

Closed codeman38 closed 7 years ago

codeman38 commented 7 years ago

In TensorFlow 0.11, the default behavior is for model states to be represented as tuples; forcing the old concatenated behavior using state_is_tuple=False prints a deprecation warning.

Adapting the code to work with state_is_tuple=True turned out to be easier than I expected, because the TensorFlow example script ptb_word_lm.py is structured very similarly to char-rnn-tensorflow and was refactored back in August to use tuple states. This pull request ports the changes from that example to char-rnn-tensorflow.

sherjilozair commented 7 years ago

Thanks!