pytorch安装加速
时间: 2023-11-04 20:00:35 浏览: 121
有几种方法可以加速安装PyTorch。一种方法是使用清华大学的镜像源来下载PyTorch和相关依赖。在命令行中输入以下命令来配置镜像源:
```
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/
```
这样就可以使用清华大学的镜像源来下载PyTorch和相关依赖,从而提高下载速度。
另一种方法是使用pip来安装PyTorch。在命令行中输入以下命令来安装指定版本的PyTorch:
```
pip install torch==1.12.1 cu111 torchvision==0.13.1 cu111 torchaudio==0.12.1 cu111 -f https://download.pytorch.org/whl/cu111/torch_stable.html
```
这样就可以通过pip安装指定版本的PyTorch,同时加速安装过程。
阅读全文
相关推荐


















