Add torch DP warning (#3698)
Browse files
train.py
CHANGED
@@ -198,6 +198,8 @@ def train(hyp, # path/to/hyp.yaml or hyp dictionary
|
|
198 |
|
199 |
# DP mode
|
200 |
if cuda and RANK == -1 and torch.cuda.device_count() > 1:
|
|
|
|
|
201 |
model = torch.nn.DataParallel(model)
|
202 |
|
203 |
# SyncBatchNorm
|
|
|
198 |
|
199 |
# DP mode
|
200 |
if cuda and RANK == -1 and torch.cuda.device_count() > 1:
|
201 |
+
logging.warning('DP not recommended, instead use torch.distributed.run for best DDP Multi-GPU results.\n'
|
202 |
+
'See Multi-GPU Tutorial at https://github.com/ultralytics/yolov5/issues/475 to get started.')
|
203 |
model = torch.nn.DataParallel(model)
|
204 |
|
205 |
# SyncBatchNorm
|