alias_neo92
alias_neo92

Reputation: 75

Tensorflow import error AttributeError: 'module' object has no attribute 'Exporter'

When I try to import tensorflow hub, I get the following error saying that 'module' object has no attribute 'Exporter'.

AttributeErrorTraceback (most recent call last)
<ipython-input-1-31fb71834c8c> in <module>()
      1 # Install TF-Hub.
      2 import tensorflow as tf
----> 3 import tensorflow_hub as hub
      4 import matplotlib.pyplot as plt
      5 import numpy as np

/usr/local/lib/python2.7/dist-packages/tensorflow_hub/__init__.py in <module>()
     24 import tensorflow as tf
     25 
---> 26 from tensorflow_hub.estimator import LatestModuleExporter
     27 from tensorflow_hub.estimator import register_module_for_export
     28 from tensorflow_hub.feature_column import image_embedding_column

/usr/local/lib/python2.7/dist-packages/tensorflow_hub/estimator.py in <module>()
     59 
     60 
---> 61 class LatestModuleExporter(tf.estimator.Exporter):
     62   """Regularly exports registered modules into timestamped directories.
     63 

AttributeError: 'module' object has no attribute 'Exporter'

Upvotes: 1

Views: 1370

Answers (1)

alias_neo92
alias_neo92

Reputation: 75

Its due to the old version of tensorflow. It should be >1.7

Upvotes: 1

Related Questions