This repository has been archived on 2024-01-06. You can view files and clone it, but cannot push or open issues or pull requests.
justhomework/AIandML/e3_deep_learning/PyTorch.md
2022-12-15 09:10:23 +08:00

30 lines
No EOL
725 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 安装PyTorch
**人工智能与机器学习**课程的深度学习部分代码采用PyTorch框架。以下为安装说明
### 1. 官网
以下为官方网站,其中给出了安装方式。
```
https://pytorch.org/
```
###2. 选择安装方式
需注意,安装时需注意考虑:
* 操作系统Windows、Linux或MacOs
* CPU或GPU后者需安装cuda指定版本
在官网上选择适当安装方式后将给出在线安装命令。例如用conda安装cuda10.2版本的PyTorch
```shell
conda install pytorch torchvision torchaudio cudatoolkit=10.2 -c pytorch
```
将其拷贝到命令行中执行即可。
### 3. 建议
因为PyTorch可能较大可以下载whl文件安装。