Skip to content

Commit

Permalink
Add torch DP warning (#3698)
Browse files Browse the repository at this point in the history
  • Loading branch information
glenn-jocher authored Jun 19, 2021
1 parent b3e2f4e commit c1af67d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions train.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c1af67d

Please sign in to comment.