簡體   English   中英

Windows 10 上的 Tensorflow-gpu 和 Textgenrnn 版本不兼容:ModuleNotFoundError:沒有名為“tensorflow.contrib”的模塊

[英]Tensorflow-gpu and Textgenrnn version incompatibility on Windows 10: ModuleNotFoundError: No module named 'tensorflow.contrib'

無論我做什么,我似乎都無法讓 TensorFlow-gpu 與 textgenrnn 很好地協同工作。 Tensorflow-gpu 測試表明一切運行正常目前,我收到錯誤消息:

ModuleNotFoundError: No module named 'tensorflow.contrib'

當我嘗試將 textgenrnn 導入為

textgen = textgenrnn(name=model_name)

有人可以提供他們的工作開發環境嗎? 我的 pip 列表是:

Package              Version
-------------------- -------------------
absl-py              0.8.1
astor                0.8.0
bleach               1.5.0
cachetools           3.1.1
certifi              2019.9.11
chardet              3.0.4
gast                 0.2.2
google-auth          1.6.3
google-auth-oauthlib 0.4.1
google-pasta         0.1.7
grpcio               1.24.3
h5py                 2.10.0
html5lib             0.9999999
idna                 2.8
joblib               0.14.0
Keras                2.3.1
Keras-Applications   1.0.8
Keras-Preprocessing  1.1.0
Markdown             3.1.1
numpy                1.17.3
oauthlib             3.1.0
opt-einsum           3.1.0
pip                  19.3.1
protobuf             3.10.0
pyasn1               0.4.7
pyasn1-modules       0.2.7
PyYAML               5.1.2
requests             2.22.0
requests-oauthlib    1.2.0
rsa                  4.0
scikit-learn         0.21.3
scipy                1.3.1
setuptools           41.5.1
six                  1.12.0
tb-nightly           2.1.0a20191029
tensorboard          2.0.1
tensorflow-estimator 2.0.1
tensorflow-gpu       2.0.0
termcolor            1.1.0
textgenrnn           1.5.0
tf-estimator-nightly 2.0.0.dev2019102908
tqdm                 4.36.1
urllib3              1.25.6
Werkzeug             0.16.0
wheel                0.33.6
wrapt                1.11.2

而我的 Python 版本是 3.6.4,CUDA 10 和 cudnn 7.4.1.5。 我也嘗試過使用更低/更高的 python 版本和 CUDA 9。 謝謝。

說到鬼鬼,幾天后我終於明白了,盡管有控制台警告。

完成以上配置,卸載tensorflow-gpu安裝tensorflow-gpu==1.14.0。

我希望這可以幫助某人。

好像是tensorflow版本有問題。 作為一個貢獻模塊,這在 TensorFlow 2.0 中不再可用,您如何再次安裝較低版本的 tensorflow-gpu。 我更喜歡 v1.14

pip3 instal tensorflow-gpu==1.14

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM