目录
安装cuda,cudnn相对应的版本后,tensorflow-gpu也得对应版本。这里记录配置tensorflow-gpu2.4.0环境和在jupyter notebook调用的踩坑实录。CUDA 和 cuDNN安装后只要版本对了就行。重装啥的还是看tensorflow。
CUDA,cuDNN下载安装
参见 https://blog.csdn.net/Qi__Xi/article/details/127127629
注意【版本匹配】,我这里是CUDA11.0+cuDNN8.0+tensorflow_gpu 2.4.0
配置tensorflow-gpu
运行anaconda prompt (用管理员)
// 在anaconda下创建虚拟环境,命名为tf240
conda create -n tf240 python=3.8
//激活tf2.4环境
conda activate tf240
//安装tensorflow-gpu 2.4.0版本
pip install tensorflow-gpu==2.4.0
至此,可以试试能不能成功
// 在虚拟环境 tf240 下,进入python
python
//进入pyth