Python 官方文档:入门教程 => 点击学习
在conda 虚拟环境下安装torch==1.7.1+GPU版本 本机环境 CUDA 11.0python 3.7 安装torch1.7.1 官网搜索确认需要下载的对应本机cuda的torch版本,使
在conda 虚拟环境下安装torch==1.7.1+GPU版本
官网搜索确认需要下载的对应本机cuda的torch版本,使用在线下载即可,会直接安装好torch、torhvision、torchaudio。
1、官网搜索对应cuda的版本
安装命令
conda install PyTorch==1.7.1 torchvision==0.8.2 torchaudio==0.7.2 cudatoolkit=11.0 -c pytorch
import torch# 检测torch、cuda、cudnn版本print(torch.__version__)print(torch.version.cuda)print(torch.backends.cudnn.version())# 是否可用gpuflag = torch.cuda.is_available()print(flag)
来源地址:https://blog.csdn.net/weixin_44764931/article/details/127766816
--结束END--
本文标题: 【pytorch】torch1.7.1安装、查看torch版本、GPU是否可用
本文链接: https://www.lsjlt.com/news/418810.html(转载时请注明来源链接)
有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341
下载Word文档到电脑,方便收藏和打印~
2024-03-01
2024-03-01
2024-03-01
2024-02-29
2024-02-29
2024-02-29
2024-02-29
2024-02-29
2024-02-29
2024-02-29
回答
回答
回答
回答
回答
回答
回答
回答
回答
回答
0