wiondow10 下安装GPU版的pytorch

2021-11-04  本文已影响0人  Joyner2018

wiondow10 下安装GPU版的pytorch

前言

配置的版本

软件以及库 版本
python 3.8
显卡驱动 496.49
cuda 11.54
cuda-toolkit 11.3
CPU型号 AMD

安装显卡驱动

https://www.nvidia.cn/Download/index.aspx?lang=cn

image

下载最新版的驱动,驱动是向下兼容的,以前低版本的问题也是非常的ok

image

安装nvcc,cuda-toolkit

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

选择后的地址为

https://developer.download.nvidia.cn/compute/cuda/11.3.0/local_installers/cuda_11.3.0_465.89_win10.exe

image

查看安装的版本

image

安装python

目前安装的是python3.8

https://www.python.org/ftp/python/3.8.5/python-3.8.5-amd64.exe

查看安装的python版本

image

下载pytorch文件

https://download.pytorch.org/whl/torch/

安装pytorch

选择后的下载地址为https://download.pytorch.org/whl/cu113/torch-1.10.0%2Bcu113-cp38-cp38-win_amd64.whl

image

安装torchvision

pip install torchvision

检查pytorch是否安装好

import torch
torch.__version__
torch.cuda.is_available()

返回结果


image
上一篇下一篇

猜你喜欢

热点阅读