crazydonkey200 / tensorflow-char-rnn

Char-RNN implemented using TensorFlow.
MIT License
425 stars 267 forks source link

ImportError: This module is deprecated. Use tf.nn.rnn_* instead. #1

Closed northanapon closed 7 years ago

northanapon commented 8 years ago

The error occurred when testing the source code:

python train.py --data_file=data/tiny_shakespeare.txt --num_epochs=10 --test

Here is the full stack:

Traceback (most recent call last):
  File "train.py", line 10, in <module>
    from char_rnn_model import *
  File "/websail/nor/tf/tensorflow-char-rnn/char_rnn_model.py", line 5, in <module>
    from tensorflow.models.rnn import rnn
  File "/home/northanapon/.virtualenvs/tf/lib/python2.7/site-packages/tensorflow/models/rnn/rnn.py", line 21, in <module>
    raise ImportError("This module is deprecated.  Use tf.nn.rnn_* instead.")
ImportError: This module is deprecated.  Use tf.nn.rnn_* instead.

I am using GPU version of Tensorflow 0.9.0rc0.

crazydonkey200 commented 8 years ago

Thanks. Just fixed the problem.

fighting41love commented 7 years ago

Same error. How to fix the problem?

northanapon commented 7 years ago

Are you sure that the same error? This was solved for long time ago. If it is related to state tuple, you should check out this pull request: https://github.com/crazydonkey200/tensorflow-char-rnn/pull/2.

fighting41love commented 7 years ago

Thanks for your response. @NorThanapon Problem solved by modifying some codes. The codes I run are written with previous version of tensorflow. However, I used another version to run the code which caused the error. Thanks!