Franck-Dernoncourt / NeuroNER

Named-entity recognition using neural networks. Easy-to-use and state-of-the-art results.
http://neuroner.com
MIT License
1.7k stars 475 forks source link

ModuleNotFoundError: No module named 'tensorflow.contrib' #154

Closed obai-d closed 5 years ago

obai-d commented 5 years ago

Running neuroner --fetch_data=conll2003 gives me the following error.

Traceback (most recent call last):
  File "pyneuroner/bin/neuroner", line 5, in <module>
    from neuroner.__main__ import main
  File "pyneuroner/lib/python3.7/site-packages/neuroner/__main__.py", line 16, in <module>
    from neuroner import neuromodel
  File "pyneuroner/lib/python3.7/site-packages/neuroner/neuromodel.py", line 20, in <module>
    from tensorflow.contrib.tensorboard.plugins import projector
ModuleNotFoundError: No module named 'tensorflow.contrib'

Apparently in TF2 'tensorflow.contrib' isn't there? Or is it a problem on my side?

Franck-Dernoncourt commented 5 years ago

Correct, tensorflow.contrib isn't in TensorFlow 2.x.

From https://www.tensorflow.org/guide/upgrade (mirror):

Because of TensorFlow 2.x module deprecations (for example, tf.flags and tf.contrib ), some changes can not be worked around by switching to compat.v1 .

Try using tensorflow==1.1.0

obai-d commented 5 years ago

Thanks, will try that.