hunkim / word-rnn-tensorflow

Multi-layer Recurrent Neural Networks (LSTM, RNN) for word-level language models in Python using TensorFlow.
MIT License
1.31k stars 495 forks source link

ImportError: cannot import name 'rnn_cell' #53

Closed shivangalld closed 7 years ago

shivangalld commented 7 years ago

Does the import statement change for Windows? I'm sorry, I'm not pretty versed in Python. error_rnn

ammarasmro commented 7 years ago

What version of Tensorflow are you running this on? The names in the api have changed, for example you need to change the rnn_cell to tf.contrib.rnn.BasicRNNCell and so on. Check the api for the current version

irpap commented 7 years ago

alasjener I had the same issue, but I checked out the master1.0 branch which has some updates for tensorflow 1.0, you can try that (git fetch --all; git checkout master1.0)

hunkim commented 7 years ago

Could you come up with a PR (perhaps using dynamic RNN)?

noi01 commented 7 years ago

Was running into the same problem. Be sure to check your Tensorflow version with the version of the word-rnn-tensorflow you want to run. For Tensorflow 1.0.1 - get master 1.0 from https://github.com/hunkim/word-rnn-tensorflow/branches .

normanheckscher commented 7 years ago

Should be working with the tensorflow 1.1 release candidate. Works from the head.