当我尝试导入tensorflow hub时,我收到以下错误,指出'module'对象没有属性'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'
答案 0 :(得分:0)
由于老版本的tensorflow。它应该> 1.7