Pytorch环境配置

Pytorch配置环境

cuda与cudnn的下载

cudatoolkit下载:https://developer.nvidia.com/cuda-toolkit-archive

cudnn下载:https://developer.nvidia.com/rdp/cudnn-archive

cuda支持情况:https://developer.nvidia.com/cuda-gpus#compute

cuda和cudnn的对应关系:https://developer.nvidia.com/rdp/cudnn-archive#a-collapse742-10

使用 PyTorch 查看 CUDA 和 cuDNN 版本

复制代码
import torch
print(torch.__version__)

print(torch.version.cuda)
print(torch.backends.cudnn.version())

安装命令

配置清华源码

复制代码
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple

安装命令

复制代码
pip install torch==1.10.1+cu102 torchvision==0.11.2+cu102 torchaudio==0.10.1+cu102 -f https://download.pytorch.org/whl/torch_stable.html

版本对应:

torchtorchvision对应关系,来源:官方Repo: vision

torch torchvision python
main / nightly main / nightly >=3.8, <=3.10
2.0.0 0.15.1 >=3.8, <=3.10
1.13.0 0.14.0 >=3.7.2, <=3.10
1.12.0 0.13.0 >=3.7, <=3.10
1.11.0 0.12.3 >=3.7, <=3.10
1.10.2 0.11.3 >=3.6, <=3.9
1.10.1 0.11.2 >=3.6, <=3.9
1.10.0 0.11.1 >=3.6, <=3.9
1.9.1 0.10.1 >=3.6, <=3.9
1.9.0 0.10.0 >=3.6, <=3.9
1.8.2 0.9.2 >=3.6, <=3.9
1.8.1 0.9.1 >=3.6, <=3.9
1.8.0 0.9.0 >=3.6, <=3.9
1.7.1 0.8.2 >=3.6, <=3.9
1.7.0 0.8.1 >=3.6, <=3.8
1.7.0 0.8.0 >=3.6, <=3.8
1.6.0 0.7.0 >=3.6, <=3.8
1.5.1 0.6.1 >=3.5, <=3.8
1.5.0 0.6.0 >=3.5, <=3.8
1.4.0 0.5.0 ==2.7, >=3.5, <=3.8
1.3.1 0.4.2 ==2.7, >=3.5, <=3.7
1.3.0 0.4.1 ==2.7, >=3.5, <=3.7
1.2.0 0.4.0 ==2.7, >=3.5, <=3.7
1.1.0 0.3.0 ==2.7, >=3.5, <=3.7
<=1.0.1 0.2.2 ==2.7, >=3.5, <=3.7

torchtorchaudio对应关系,来源:官方Repo: audio

torch torchaudio python
main / nightly main / nightly >=3.8, <=3.10
2.0.1 2.0.2 >=3.8, <=3.11
2.0.0 2.0.1 >=3.8, <=3.11
1.13.1 0.13.1 >=3.7, <=3.10
1.13.0 0.13.0 >=3.7, <=3.10
1.12.0 0.12.0 >=3.7, <=3.10
1.11.0 0.11.0 >=3.7, <=3.9
1.10.0 0.10.0 >=3.6, <=3.9
1.9.1 0.9.1 >=3.6, <=3.9
1.9.0 0.9.0 >=3.6, <=3.9
1.8.2 0.8.2 >=3.6, <=3.9
1.8.1 0.8.1 >=3.6, <=3.9
1.8.0 0.8.0 >=3.6, <=3.9
1.7.1 0.7.2 >=3.6, <=3.9
1.7.0 0.7.0 >=3.6, <=3.8
1.6.0 0.6.0 >=3.6, <=3.8
1.5.0 0.5.0 >=3.5, <=3.8
1.4.0 0.4.0 ==2.7, >=3.5, <=3.8
  • 当已经装好torch包时,pip install torchvision torchaudio会自动寻找对应的版本安装。 等待再次验证是否有效。

备注

帮忙安装各种深度学习环境:anaconda,pycharm,tensorflow,pytorch,虚拟机配置等等,也可帮忙配置和复现顶会论文;可联系1505413361@qq.com,不是free的哈,伸手党勿扰谢谢

相关推荐
曲幽5 小时前
FastAPI + PostgreSQL 实战:从入门到不踩坑,一次讲透
python·sql·postgresql·fastapi·web·postgres·db·asyncpg
yiyu07167 小时前
3分钟搞懂深度学习AI:实操篇:池化层
人工智能·深度学习
亚马逊云开发者7 小时前
5 分钟用 Amazon Bedrock 搭一个 AI Agent:从零到能干活
人工智能·agent·amazon
小兵张健7 小时前
白嫖党的至暗时期
人工智能·chatgpt·aigc
IT_陈寒9 小时前
SpringBoot项目启动慢?5个技巧让你的应用秒级响应!
前端·人工智能·后端
用户83562907805110 小时前
使用 C# 在 Excel 中创建数据透视表
后端·python
小徐_233310 小时前
向日葵 x AI:把远程控制封装成 MCP,让 AI 替我远程控制设备
前端·人工智能
桦说编程11 小时前
Harness Engineering — AI 时代的工程最佳实践
人工智能·架构·代码规范
老纪的技术唠嗑局11 小时前
Agent / Skills / Teams 架构演进流程及技术选型之道
人工智能·agent