Inference needs stable statistics, but a single batch is noisy. The paper (and later practice) tracks an exponential moving average of batch means and variances over training, updated after each batch.
Implement update_running_stats(running_mean, running_var, batch_mean, batch_var, momentum), which returns the updated running mean and variance.
momentum is in [0, 1]; the default is 0.1.Blend the old value with the new one: (1 - momentum) * old + momentum * new, for both mean and variance.
No results yet
Run your code to check it against the examples, or submit to run every test.