Tensorflow-probability、Tensorflow、Tensor2Tensor、CUDA之间的版本对应关系

ImportError: This version of TensorFlow Probability requires TensorFlow version >= 1.13.1; Detected an installation of version 1.12.0. Please upgrade TensorFlow to proceed.

本机使用GTX1080ti

目前Tensorflow稳定版本为1.13.1
Tensor2Tensor最新版为1.13
安装Tensor2Tensor最新版时默认安装:Tensorflow-probability-0.6.0
并且最新版本的T2T依赖于Tensorflow-1.13.1
而Tensorflow-1.13.1的GPU版本仅仅支持CUDA10(恶性循环啊!!!坑爹啊!难道不都是先装的CUDA吗?一般都会装CUDA9吧)
Tensorflow-probability-0.6.0也依赖于Tensorflow-1.13.1
所以,,如果看到这篇文章的你也遇到了这个问题,最简便的修复方法:

sudo pip3 uninstall tensor2tensor
sudo pip3 install tensor2tensor==1.9.0
sudo pip3 uninstall tensorflow-probability
sudo pip3 uninstall tensorflow-probability-gpu
sudo pip3 install tensorflow-probability==0.5.0 #查阅官方文档,0.5版本支持TF1.12
#文档地址:https://github.com/tensorflow/probability/releases/tag/v0.5.0
#官方介绍,从0.5版本开始已经结合了cpu与GPU版本,不必再单独安装GPU版本

Release Notes
This is the 0.5.0 release of TensorFlow Probability. It’s tested and stable against TensorFlow 1.12.

Packaging Change
As of this release, we no longer package a separate GPU-specific build. Users can select the version of TensorFlow they wish to use (CPU or GPU), and TensorFlow Probability will work with both.
As a result, we no longer explicitly list a TensorFlow dependency in our package requirements (since we can’t know which version the user will want). If TFP is installed with no TensorFlow package present, or with an unsupported TensorFlow version, we will issue an ImportError at time of import.

本机环境:

#本机未安装CPU版本的TF
mesh-tensorflow==0.0.5
tensor2tensor==1.9.0
tensorboard==1.12.2
tensorflow-datasets==1.0.1
tensorflow-estimator==1.13.0
tensorflow-gpu==1.12.0
tensorflow-metadata==0.12.1
tensorflow-probability==0.5.0
tensorflow-serving-api==1.13.0
python3.6
CUDA 9.0.176
CUDNN 7.0.5
Driver Version: 418.43 #不一定要最新版本的显卡驱动,要使用Nvidia-Docker被迫更新显卡驱动,稳定版本应该是390.77
#GPU:GTX 1080 ti

同时有一个疑问,在没有更新显卡驱动之前我使用nvidia-smi上面显示我的CUDA版本与我真实的CUDA版本一致,但是当我更新到了最新版本的显卡驱动,依旧安装支持版本的CUDA9,使用nvidia-smi命令显示CUDA10,可能是一个BUG,不知道什么时候会修复。

最后吐槽一下,,,,最近怎么这么多感冒的!!!2019.03.12

你可能感兴趣的:(#,机器翻译学习,模型部署,Tensor2Tensor,T2T,Docker,神经机器翻译)