where \(\mathrm {F}\)  is the input feature to the batch norm layer and \(\gamma \) , \(\beta \)  are scale and shift parameters, also learned during training.
The subscript \(s\)  indicates source data.
The underlying reason behind using the train statistics instead of the test batch statistics is that the train statistics are estimated on a much larger set compared to a batch of test data, which is much smaller and hence can give a biased estimate of the statistics.
While this method works well for the test samples drawn from a distribution similar to the source, its performance may degrade if the test samples come from a different distribution. This is because the feature distribution \(\mathrm {F}\)  of the intermediate layers of the network may have mean and variance shifted from the train statistics, due to the shift in the input distribution. This is often termed as internal covariate shift [1]}, [2]}.
