Add --sync-bn known issue (#4032)

* Add `--sync-bn` known issue

* Update train.py
This commit is contained in:
Glenn Jocher authored and GitHub committed 2021-07-17 13:07:19 +02:00
1 parent b7e985e397
commit 951922c735
1 file changed
+1
+1
View File
@@ -217,6 +217,7 @@ def train(hyp, # path/to/hyp.yaml or hyp dictionary
# SyncBatchNorm # SyncBatchNorm
if opt.sync_bn and cuda and RANK != -1: if opt.sync_bn and cuda and RANK != -1:
raise Exception('can not train with --sync-bn, known issue https://github.com/ultralytics/yolov5/issues/3998')
model = torch.nn.SyncBatchNorm.convert_sync_batchnorm(model).to(device) model = torch.nn.SyncBatchNorm.convert_sync_batchnorm(model).to(device)
logger.info('Using SyncBatchNorm()') logger.info('Using SyncBatchNorm()')