繁体   English   中英

gpt-2 不能与 python 一起使用吗?

[英]Is gpt-2 unusable with python?

我正在关注教程并在使用 train.py 时遇到了一个问题。 问题说

Exception has occurred: ModuleNotFoundError
No module named 'tensorflow.contrib'
  File "F:\PythonFiles\Post Generator\gpt-2\src\model.py", line 3, in <module>
    from tensorflow.contrib.training import HParams

我在互联网上搜索了很多,结果发现 tensorflow.contrib 已被弃用。 那么有没有其他方法可以做到这一点,或者 gpt-2 不能与 python 一起使用?

我也试过

pip install tensorflow==1.15

ERROR: Could not find a version that satisfies the requirement tensorflow==1.15 (from versions: 2.2.0rc1, 2.2.0rc2, 2.2.0rc3, 2.2.0rc4, 2.2.0)
ERROR: No matching distribution found for tensorflow==1.15

尝试这个:

pip install tensorflow-gpu==1.15.0
pip install 'tensorflow-estimator<1.15.0rc0,>=1.14.0rc0' --force-reinstall

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM