无法加载tensorflow_集线器

2024-05-14 13:21:29 发布

您现在位置:Python中文网/ 问答频道 /正文

写入import tensorflow_hub后,出现以下错误:

class LatestModuleExporter(tf.estimator.Exporter):

AttributeError:“tensorflow.python.estimator.estimator_lib”模块没有“Exporter”属性

我在Windows 10上使用python 3.6和tensorflow 1.7

谢谢!


Tags: 模块import属性windowslibtftensorflow错误
3条回答

你应该至少有tensorflow 1.7.0,通过:

pip install "tensorflow>=1.7.0"
pip install tensorflow-hub

然后:

pip install tensorflow-hub

来源:here

我相信您的python3运行时并不是真正使用tensorflow 1.7运行的。该属性自tensorflow 1.4以来就存在。我怀疑python2/3环境不匹配,pip/pip3安装不匹配,或者tensorflow和tf nightly pip包安装都有问题。

您可以再次检查:

$ python3 -c "import tensorflow as tf; print(tf.__version__)"

您可以重新安装TensorFlow_集线器:

pip install ipykernel

pip install tensorflow_hub

相关问题 更多 >

    热门问题