Python 官方文档:入门教程 => 点击学习
因为电脑里有配置paddle环境,当时用的cuda11.2,现在又要配置torch环境,查看torch官网后发现没有cuda11.2版本对应的torch下载。 考虑到版本向下兼容,可能不一定非要下载cuda=11.2对应的那个版本的torc
https://download.pytorch.org/whl/torch_stable.html
当然也可以在官网Previous PyTorch Versions | PyTorch
直接选择
# CUDA 11.1pip install torch==1.9.1+cu111 torchvision==0.10.1+cu111 torchaudio==0.9.1 -f https://download.pytorch.org/whl/torch_stable.html
import torchprint(torch.cuda.is_available()) # cuda是否可用print(torch.cuda.current_device()) # 返回当前设备索引print(torch.cuda.device_count()) # 返回GPU的数量print(torch.cuda.get_device_name(0))
答案是肯定的呀。请看输出结果如下。
啦啦啦啦,我是聪明的小行家。。。。。。。。
来源地址:https://blog.csdn.net/wangmengmeng99/article/details/128318248
--结束END--
本文标题: cuda11.2版本的对应安装的pytorch版本
本文链接: https://www.lsjlt.com/news/390633.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