我正在学习this教程,在使用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发布于 2020-06-27 10:24:28
试试这个:
pip install tensorflow-gpu==1.15.0
pip install 'tensorflow-estimator<1.15.0rc0,>=1.14.0rc0' --force-reinstallhttps://stackoverflow.com/questions/62362406
复制相似问题