From 5b7cc16ac915f9c162406ac855b29e6819296e64 Mon Sep 17 00:00:00 2001 From: Ross Wightman Date: Fri, 31 Jan 2020 11:43:34 -0800 Subject: [PATCH] Add warning about using sync-bn with zero initialized BN layers. Fixes #54 --- train.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/train.py b/train.py index e3eec357..bfb7568f 100755 --- a/train.py +++ b/train.py @@ -315,7 +315,9 @@ def main(): else: model = torch.nn.SyncBatchNorm.convert_sync_batchnorm(model) if args.local_rank == 0: - logging.info('Converted model to use Synchronized BatchNorm.') + logging.info( + 'Converted model to use Synchronized BatchNorm. WARNING: You may have issues if using ' + 'zero initialized BN layers (enabled by default for ResNets) while sync-bn enabled.') except Exception as e: logging.error('Failed to enable Synchronized BatchNorm. Install Apex or Torch >= 1.1') if has_apex: