文章目录
- 前言
- 训练
-
- 单 GPU
- 多[GPU数据并行](https://pytorch.org/docs/stable/nn.html#torch.nn.DataParallel)模式(不推荐)
- 多GPU [DistributedData并行](https://pytorch.org/docs/stable/nn.html#torch.nn.parallel.DistributedDataParallel)模式(推荐)
- 使用特定GPU
- 使用SyncBatchNorm
- 使用DistributedDataParallel
-
- 笔记
- 结果
介绍了如何在单台或多台机器上正确使用 多个 GPU 通过 YOLOv5 训练数据集。
前言
克隆存储库和安装要求.txt在 Python>=3.8.0 环境中,包括 PyTorch>=1.8。模型和数据集从最新的 YOLOv5 版本自动下载。
git clone https://github.com/ultralytics/yolov5 # clone
cd yolov5
pip install -r requirements.txt # install
专业提示!建议将 Docker Image 用于所有多 GPU 训练。
专业