Assert `--image-weights` not combined with DDP (#3275)
Browse files
train.py
CHANGED
@@ -525,6 +525,7 @@ if __name__ == '__main__':
|
|
525 |
device = torch.device('cuda', opt.local_rank)
|
526 |
dist.init_process_group(backend='nccl', init_method='env://') # distributed backend
|
527 |
assert opt.batch_size % opt.world_size == 0, '--batch-size must be multiple of CUDA device count'
|
|
|
528 |
opt.batch_size = opt.total_batch_size // opt.world_size
|
529 |
|
530 |
# Hyperparameters
|
|
|
525 |
device = torch.device('cuda', opt.local_rank)
|
526 |
dist.init_process_group(backend='nccl', init_method='env://') # distributed backend
|
527 |
assert opt.batch_size % opt.world_size == 0, '--batch-size must be multiple of CUDA device count'
|
528 |
+
assert not opt.image_weights, '--image-weights argument is not compatible with DDP training'
|
529 |
opt.batch_size = opt.total_batch_size // opt.world_size
|
530 |
|
531 |
# Hyperparameters
|