Ubuntu 18.04 安装Pytorch gpu版本

Pytorch官网:https://pytorch.org/get-started/previous-versions/
在这里插入图片描述

我是直接安装在base环境,用pip安装1.8.0版本

pip install torch==1.8.0 torchvision==0.9.0 torchaudio==0.8.0

验证gpu版本是否安装成功
检测程序如下:

import torch

print(torch.__version__)
print(torch.cuda.is_available())

在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/mao_hui_fei/article/details/121148610
今日推荐