The stats are updated in the ATen implementation 360.
If you would like to create a custom Python implementation, you could initialize the layer similar to the current BatchNorm implementation (i.e. register the affine parameters as nn.Parameter and the running estimates as buffers) and update the estimates manually.
Let me know, if you get stuck somewhere.