Assert --image-weights not combined with DDP (#3275)

This commit is contained in:
Glenn Jocher authored and GitHub committed 2021-05-21 14:46:42 +02:00
1 parent 7b36e38cf8
commit 10d56d784e
1 file changed
+1
+1
View File
@@ -525,6 +525,7 @@ if __name__ == '__main__':
device = torch.device('cuda', opt.local_rank)
dist.init_process_group(backend='nccl', init_method='env://') # distributed backend
assert opt.batch_size % opt.world_size == 0, '--batch-size must be multiple of CUDA device count'
assert not opt.image_weights, '--image-weights argument is not compatible with DDP training'
opt.batch_size = opt.total_batch_size // opt.world_size
# Hyperparameters