什么是PyTorch
PyTorch是由Meta(Facebook)开发的深度学习框架,具有以下特点:
- 动态计算图,更Pythonic
- 研究友好,调试方便
- 学术界广泛使用
安装PyTorch
# CPU版本
pip install torch torchvision torchaudio
# CUDA版本(根据CUDA版本选择)
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121
点击"运行命令"查看安装说明