In the train mode, batch normalization calculates the statistics for the batch you provide, normalizes by calculated statistics and applies affine transformation. In the eval mode, instead of calculating statistics, batch norm uses provided moving averages to normalize. Having different output in eval and train mode is expected.