[英]tensorflow AttributeError: 'module' object has no attribute 'data'
[英]Tensorflow import error AttributeError: 'module' object has no attribute 'Exporter'
当我尝试导入tensorflow集线器时,出现以下错误,提示``模块''对象没有属性``导出器''。
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'
这是由于tensorflow的旧版本。 应该> 1.7
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.