yoavz / music_rnn

Music Language Modeling with Recurrent Neural Networks
http://yoavz.com/music_rnn
197 stars 38 forks source link

deprecation error: tensorflow/models/rnn/rnn_cell.py #3

Closed tthtlc closed 7 years ago

tthtlc commented 8 years ago

Traceback (most recent call last): File "rnn.py", line 16, in from model import Model, NottinghamModel File "/home/tteikhua/neural_network/music_rnn/model.py", line 5, in from tensorflow.models.rnn import rnn_cell File "/usr/local/lib/python2.7/dist-packages/tensorflow/models/rnn/rnn_cell.py", line 21, in raise ImportError("This module is deprecated. Use tf.nn.rnn_cell instead.") ImportError: This module is deprecated. Use tf.nn.rnn_cell instead.

Not sure how the above error can be overcome?

hiorws commented 8 years ago

you have to use tensorflow==0.8.0 to install that, just uninstall the tensorflow

pip uninstall tensorflow
pip install --upgrade https://storage.googleapis.com/tensorflow/mac/tensorflow-0.8.0-py2-none-any.whl

i assume rnn_cell.py will be successfully work.

i hope it will help.

tthtlc commented 7 years ago

python -c 'import tensorflow as tf; print(tf.version)' give me: 0.9.0

and so I must downgrade the TF version? Latest version is already 0.11.

hiorws commented 7 years ago

Yes you have to use 0.8.0 version of tensorflow.

bzamecnik commented 7 years ago

Importing TensorFlow installed this way gives me:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/bza/anaconda3/envs/python2/lib/python2.7/site-packages/tensorflow/__init__.py", line 23, in <module>
    from tensorflow.python import *
  File "/home/bza/anaconda3/envs/python2/lib/python2.7/site-packages/tensorflow/python/__init__.py", line 45, in <module>
    from tensorflow.python import pywrap_tensorflow
  File "/home/bza/anaconda3/envs/python2/lib/python2.7/site-packages/tensorflow/python/pywrap_tensorflow.py", line 28, in <module>
    _pywrap_tensorflow = swig_import_helper()
  File "/home/bza/anaconda3/envs/python2/lib/python2.7/site-packages/tensorflow/python/pywrap_tensorflow.py", line 24, in swig_import_helper
    _mod = imp.load_module('_pywrap_tensorflow', fp, pathname, description)
ImportError: /home/bza/anaconda3/envs/python2/lib/python2.7/site-packages/tensorflow/python/_pywrap_tensorflow.so: invalid ELF header
bzamecnik commented 7 years ago

Wrong build of TensorFlow installed. For my system (Ubuntu 16.04 + GPU):

pip install --upgrade https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow-0.8.0-cp27-none-linux_x86_64.whl

https://www.tensorflow.org/versions/r0.8/get_started/os_setup.html

yoavz commented 7 years ago

Thank you @bzamecnik for performing much needed maintenance! Closing for now