原因:tf2中删除了contrib这个库
解决方法:安装tf<1.15以下的gpu版本即可
pip install tensorflow-gpu==1.13、1.14 or 1.15
测试成功,没有在报错:
其他解决方法:`ModuleNotFoundError: No module named ‘tensorflow.python.types’
pip uninstall tensorflow_estimator pip install tensorflow_estimator

原因:tf2中删除了contrib这个库
解决方法:安装tf<1.15以下的gpu版本即可
pip install tensorflow-gpu==1.13、1.14 or 1.15
测试成功,没有在报错:
其他解决方法:`ModuleNotFoundError: No module named ‘tensorflow.python.types’
pip uninstall tensorflow_estimator pip install tensorflow_estimator