torch的cuda版本安装

1.拥有英伟达显卡NVIDIA

NVIDIA CUDA各版本下载链接(包括最新11版本和以往10.2版本)

以下是从NVIDIA官网转过来的链接,方便需要下载各种版本CUDA的同学。(借阅)

https://blog.csdn.net/weixin_44177494/article/details/120444922?spm=1001.2014.3001.5502

例:https://developer.nvidia.com/cuda-downloads

https://developer.nvidia.com/cuda-11-4-1-download-archive

pytorch安装https://pytorch.org/get-started/locally/
annaconda安装https://www.anaconda.com/download/

2.查看自己的cuda版本

 

 

3.cmd安装cuda环境

选择对应的框复制下面的代码在命令框中输入

4.进入网页下载cuda版本的torch库

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

例如:

5.安装库

6.进行测试

1 import torch
2 print(torch.__version__)
3 print(torch.device(type="cuda",index=1))
4 print("是否使用GPU训练:{}".format(torch.cuda.is_available()))

当显示为True则已配置成功

posted @   一眉师傅  阅读(533)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 全程不用写代码,我用AI程序员写了一个飞机大战
· DeepSeek 开源周回顾「GitHub 热点速览」
· 记一次.NET内存居高不下排查解决与启示
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· .NET 10首个预览版发布:重大改进与新特性概览!
点击右上角即可分享
微信分享提示