安装cuda10.1和cudnn
首先用conda创建一个虚拟环境tf
conda create -n tf python=3.6
激活虚拟环境,在虚拟环境中安装cuda和cudnn
activate tf
然后用conda安装cuda和cudnn
conda install cudatoolkit=10.1 cudnn=7.6
安装tensorflow-gpu
使用pip命令安装
pip install tensorflow-gpu
测试tensorflow-gpu
import tensorflow as tf
print('GPU',tf.test.is_gpu_available())
显示“GPU True”,即代表GPU版本安装成功!
通过conda图形界面安装的方法
https://blog.csdn.net/weixin_44754046/article/details/97663626