Skip to content

Commit 8402878

Browse files
authored
Merge pull request pytorch#233 from DTennant/patch-1
Fix a typo in optimized_sync_batchnorm_kernel.py
2 parents a8c2b7d + 9b114c1 commit 8402878

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

apex/parallel/optimized_sync_batchnorm_kernel.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def forward(ctx, input, weight, bias, running_mean, running_variance, eps, track
5151
running_variance.data = running_variance.data * (1-momentum) + momentum*r_v_inc
5252
else:
5353
mean = running_mean.data
54-
inv_std = 1.0 / torch.sqrt(running_var.data + eps)
54+
inv_std = 1.0 / torch.sqrt(running_variance.data + eps)
5555

5656
ctx.save_for_backward(input, weight, mean, inv_std)
5757
ctx.process_group = process_group

0 commit comments

Comments
 (0)