cuda和cudnn的选择
cuda的选择
TensorFlow1.0至1.4版本只支持CUDA8.0
TensorFlow1.5至1.12版本支持CUDA9.0
TensorFlow1.13之后的版本,支持10.0
更多版本CUDA:
https://developer.nvidia.com/cuda-toolkit-archive
cuDNN
cuDNN库的版本选择也是有规定的。以Windows10操作为例:
TensorFlow1.0到1.2版本使用的是cuDNN5.1版本(安装包为cudnn8.0-Windows10-x64-v5.1.zip)
TensorFlow1.3到1.4版本使用的是cuDNN6.0版本(安装包为cudnn8.0-Windows10-x64-v6.0.zip)
TensorFlow1.5到1.10版本使用的是cuDNN7.0版本(安装包为cudnn9.0-Windows10-x64-v7.rar)
TensorFlow1.11到1.12版本使用的是cuDNN7.2版本(安装包为cudnn9.0-Windows10-x64-v7.2.1.38.zip)
TensorFlow1.13之后使用的是cuDNN7.5版本(安装包为cudnn10.0-Windows10-x64-v7.5.056.zip)
TensorFlow-GPU国内源的安装
1.先安装anaconda创建环境
conda create -n tfgpu python=3.6.4
2.安装TensorFlowGPU1.13(清华源)
python -m pip install -i https://pypi.tuna.tsinghua.edu.cn/simple tensorflow-gpu==1.13.1
3.安装TensorFlowGPU2.0
python -m pip install -i https://pypi.tuna.tsinghua.edu.cn/simple tensorflow-gpu==2.0.0a0
注:清华镜像https://pypi.tuna.tsinghua.edu.cn/simple