1、conda安装 https://blog.csdn.net/qq_41101213/article/details/115469136
2、cuda 11.0安装
3、cudnn 8.0.5解压安装
命令1 nvcc -V
命令2 nvidia-smi
二、torchversion 1.7.1
命令 conda install pytorch torchvision torchaudio cudatoolkit 11.0 -c pytorch -c conda-forge
验证
python
import torch
print( torch.__version__ )
print( torch.cuda.is_available() )
print( torch.cuda.device_count() )
三、tensorflow-gpu 2.4.0
版本参考 https://tensorflow.google.cn/install/source_windows#gpu
命令
此处安装时需要关闭代理
pip install tensorflow-gpu 2.4.0
conda search tensorflow-gpu 安装失败 无2.4.0
验证
python
import tensorflow as tf
print(tf.version.VERSION)
print(tf.test.is_built_with_cuda())
print(tf.test.is_gpu_available())
torch.version.cuda
torch.backends.cudnn.version()
torch.cuda.get_device_name()



