RTX2080Ti+Win10+Cuda10.1+Cudnn7.6+tensorflow-gpu2

文章目录

    • 1.tf官网说明
    • 2.Anaconda安装
    • 3.conda tf虚拟环境
    • 4.tf-gpu安装
    • 5.cuda安装
    • 6.cudann安装

1.tf官网说明

https://www.tensorflow.org/install/gpu
RTX2080Ti+Win10+Cuda10.1+Cudnn7.6+tensorflow-gpu2_第1张图片

2.Anaconda安装

https://www.anaconda.com/products/individual

3.conda tf虚拟环境

conda create -n tf2 python=3.6.5

conda 换国内的镜像源

4.tf-gpu安装

conda install tensorflow-gpu  
#会自动安装cuda10.1,cudnn7.6.5等依赖哦,缺点是只能在此虚拟环境下使用
#或者pip,lunix系统实测有效
pip install tensorflow-gpu==2.3.0
  1. 如果报错compat,把下面版本降低一点
conda install tensorflow-estimator==2.1.0 
  1. 测试
import tensorflow as tf
tf.__version__

至此tf-gpu安装完毕,是不是觉得太简单了?
缺点有下:
该方法只适合特定环境和特定tf版本gpu,有很多版本或者用pip安装时是只安装tensorflow-gpu而不会安装cuda,cudann等依赖的

。。。

下面尝试一般方法:

5.cuda安装

  1. 为了便于其他地方使用gpu,也把cuda给安装了

https://developer.nvidia.com/cuda-toolkit-archive

  1. 为了装cuda,也需要VS(若有无需)
    VS官网2019

6.cudann安装

cuda安装教程+cudnn安装教程—Hello_World_admin
此文很详细了,感谢开源!

你可能感兴趣的:(#)