1. PyTorch官方安装方式:
链接: https://pytorch.org/get-started/previous-versions/
通过whl安装: http://download.pytorch.org/whl/torch_stable.html.
2. 查看Pytorch版本:
import torch
print(torch.__version__) #查看torch版本
torch.cuda.is_available() #查看torch-gpu版本是否可用
torch.cuda.device_count() #返回gpu数量
1. Tensorflow安装方式:
链接: https://wiki.jikexueyuan.com/project/tensorflow-zh/get_started/os_setup.html
2. 查看Tensorflow版本:
import tensorflow as tf
tf.__version__ #查看版本
tf.__path__ #查看安装位置
tf.test.is_gpu_available() #查看gpu版本是否可用
1. cuda官方安装方式:
链接: https://developer.nvidia.com/cuda-toolkit-archive
2. cuda版本:
import torch
print(torch.version.cuda) #查看cuda版本
torch.backends.cudnn.version() #查看cudnn版本
torch.cuda.get_device_name(0) #查看显卡类型
3. cudnn官方下载(需注册):
链接: https://developer.nvidia.com/rdp/cudnn-archive
1. linux查看显卡类型:
lspci | grep -i nvidia
2. 查看NVIDIA驱动版本
sudo dpkg --list | grep nvidia-*
或者
cat /proc/driver/nvidia/version
3. 驱动下载地址:
链接: https://www.nvidia.cn/Download/index.aspx?lang=cn
版权说明 : 本文为转载文章, 版权归原作者所有 版权申明
原文链接 : https://blog.csdn.net/luanfenlian0992/article/details/108303902
内容来源于网络,如有侵权,请联系作者删除!