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

Replace deprecated Tensorflow functions #76

Closed hugovk closed 7 years ago

hugovk commented 7 years ago

Tensorflow 0.12.1

Before:

$ python sample.py 
WARNING:tensorflow:From sample.py:36 in sample.: initialize_all_variables (from tensorflow.python.ops.variables) is deprecated and will be removed after 2017-03-02.
Instructions for updating:
Use `tf.global_variables_initializer` instead.
WARNING:tensorflow:From sample.py:37 in sample.: all_variables (from tensorflow.python.ops.variables) is deprecated and will be removed after 2017-03-02.
Instructions for updating:
Please use tf.global_variables instead.
 is ending brecatauted night.

POLION:
Now, if lays so forgion wor thou Edward;
We follow to't retrebthen with me, I would grant
Mis reby.

After:

$ python sample.py
 shen the had oul wach:
Marets an then us in this angrerine:
And Gugle if thee wive
To proolese as weshen his herpe?
hugovk commented 7 years ago

Closing, this has been merged as part of https://github.com/sherjilozair/char-rnn-tensorflow/pull/81.

https://github.com/sherjilozair/char-rnn-tensorflow/pull/81/files#diff-086ae17ebd1d85217865fc991fdc5fb8L36