During training the biased variance is calculated from the batch and applied, while the unbiased is used to calculate the running stats.
Code to reproduce:
x = torch.tensor([0, 1.0]).view(1, 1, 2, 1)
var = x.var([0, 2, 3], unbiased=False)
mean = x.mean([0, 2, 3])

out = (x - mean[None, :, None, None]) / torch.sqrt(var[None, :, None, None])

Also, have a look at this manual batchnorm approach 1 I’ve written some time ago.