From f3deaba4065b360fb724e482530ad1d8f6070746 Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Sat, 19 Jun 2021 19:50:46 +0200 Subject: [PATCH] Add torch DP warning (#3698) --- train.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/train.py b/train.py index 5ad47fe9ea6a..68cd7fab574c 100644 --- a/train.py +++ b/train.py @@ -198,6 +198,8 @@ def train(hyp, # path/to/hyp.yaml or hyp dictionary # DP mode if cuda and RANK == -1 and torch.cuda.device_count() > 1: + logging.warning('DP not recommended, instead use torch.distributed.run for best DDP Multi-GPU results.\n' + 'See Multi-GPU Tutorial at https://github.com/ultralytics/yolov5/issues/475 to get started.') model = torch.nn.DataParallel(model) # SyncBatchNorm