Skip to content

Commit

Permalink
Update pytorch.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Geniusyingmanji authored Aug 8, 2024
1 parent dfda8db commit 5cc904f
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/ai/pytorch.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ https://pytorch.org/get-started/previous-versions/
```
pip install torch torchvision torchaudio -i https://pypi.tuna.tsinghua.edu.cn/simple
```
#### 指定torch, cuda版本(preffered)
#### 指定版本(preffered)
创建名为pytorch310的虚拟环境
```
conda create -n pytorch310 python==3.10
Expand All @@ -32,9 +32,13 @@ conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/m
conda config --set show_channel_urls yes
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/
```
安装并指定cuda版本
#### 安装最新版
```
conda install pytorch torchvision torchaudio cudatoolkit=10.2
```
#### 指定版本
```
conda install pytorch torchvision cudatoolkit=10.2
conda install pytorch==1.10.0 torchvision==0.11.0 torchaudio==0.10.0 cudatoolkit=10.2
```

## Tutorial
Expand Down

0 comments on commit 5cc904f

Please sign in to comment.