Skip to content

Commit 5cc904f

Browse files
Update pytorch.md
1 parent dfda8db commit 5cc904f

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/ai/pytorch.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ https://pytorch.org/get-started/previous-versions/
77
```
88
pip install torch torchvision torchaudio -i https://pypi.tuna.tsinghua.edu.cn/simple
99
```
10-
#### 指定torch, cuda版本(preffered)
10+
#### 指定版本(preffered)
1111
创建名为pytorch310的虚拟环境
1212
```
1313
conda create -n pytorch310 python==3.10
@@ -32,9 +32,13 @@ conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/m
3232
conda config --set show_channel_urls yes
3333
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/
3434
```
35-
安装并指定cuda版本
35+
#### 安装最新版
36+
```
37+
conda install pytorch torchvision torchaudio cudatoolkit=10.2
38+
```
39+
#### 指定版本
3640
```
37-
conda install pytorch torchvision cudatoolkit=10.2
41+
conda install pytorch==1.10.0 torchvision==0.11.0 torchaudio==0.10.0 cudatoolkit=10.2
3842
```
3943

4044
## Tutorial

0 commit comments

Comments
 (0)