mirror of https://github.com/open-mmlab/mmcv.git
Fixed group of syncbn (#427)
parent
4a044c6466
commit
07e4215286
|
@ -126,7 +126,8 @@ class SyncBatchNorm(Module):
|
|||
self.momentum = momentum
|
||||
self.affine = affine
|
||||
self.track_running_stats = track_running_stats
|
||||
self.group = dist.group.WORLD if group is None else group
|
||||
group = dist.group.WORLD if group is None else group
|
||||
self.group = group
|
||||
self.group_size = dist.get_world_size(group)
|
||||
if self.affine:
|
||||
self.weight = Parameter(torch.Tensor(num_features))
|
||||
|
|
Loading…
Reference in New Issue