It should work also while training. gamma and beta are still trainable parameters, the only difference is that they are applied to the inputs normalized using the batch mean statistics and fixed variance.