I've been playing around with batch normalization in Keras. I was wondering if batch normalization also normalizes the inputs to the neural network. Does that mean I do not need to standardize my inputs to my network and rely on BN to do it?
Asked
Active
Viewed 2,449 times
1 Answers
8
While you can certainly use it for that, batch normalization is not designed to do that and you will most likely introduce sampling error in your normalization due to the limited sample size (sample size is your batch size).
Another factor for why I would not recommend using batch normalization for normalizing your inputs is that it introduces the correction terms gamma and beta (trained parameters) which will skew your training data if not disabled.
For normalization of your test data I would recommend using z-score normalization on the complete training set (e.g., via sklearn's StandardScaler) or some appropriate alternative, but not batch normalization.

nemo
- 55,207
- 13
- 135
- 135
-
1So, are you saying that if I use all the standard parameters in BatchNormalization(except momentum=1 and epsilon = 0) as the first layer, it is essentially equal to z-score normalization? – V Shreyas Mar 09 '17 at 06:17
-
3Yes but with a smaller sample to estimate the mean and variance (i.e. your batch size). – nemo Mar 09 '17 at 13:13