Skip to content

Commit 4b984a7

Browse files
CapMochahellock
authored andcommitted
bug for distributed training (#1985)
fix a bug for distributed training in windows platform
1 parent e032ebb commit 4b984a7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mmdet/apis/train.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ def parse_losses(losses):
7373
log_vars['loss'] = loss
7474
for loss_name, loss_value in log_vars.items():
7575
# reduce loss when distributed training
76-
if dist.is_initialized():
76+
if dist.is_available() and dist.is_initialized():
7777
loss_value = loss_value.data.clone()
7878
dist.all_reduce(loss_value.div_(dist.get_world_size()))
7979
log_vars[loss_name] = loss_value.item()

0 commit comments

Comments
 (0)