Is there a way to use BatchNormalizationLayer without having it learn its Gamma and Beta parameters? I’d like to have a BN learn its MovingMean and MovingVariance parameters during training, but leave its Gamma and Beta alone at 1 and 0 respectively. If during NetTrain I set the LearningRateMultipliers for either Gamma or Beta to None, then a BN still learns both its MovingMean and MovingVariance, as I expect. However, if I set the LearningRateMultipliers for both Gamma and Beta to None, then MovingMean and MovingVariance don’t get learned. Instead, they maintain their initial values of 0 and 1 respectively. (I also tried setting the BNLayer’s “Gamma”->None and “Beta”->None in analogy to the way ConvLayers let you specify “Biases”->None, but this gives an error message.)
I’m still learning about neural networks, so I might be thinking about something wrong, but here’s the reason I’m trying to do this:
The original Batch Normalization paper (Ioffe, Szegedy) placed the BN after the linear layer / convolution, but there has been discussion since then about placing the BN before the convolution (e.g., on reddit). My thinking is that if the BN comes before a convolution, then the conv can learn any needed scaling and bias, so the BN shouldn’t need to scale or bias its own output, i.e., the BN can just leave its own Gamma=1 and Beta=0, and the conv can learn to expect zero-mean and unit-variance input. But I’d still want the BN to learn its activation statistics during training in this case. I.e., it should still learn its MovingMean and MovingVariance parameters so that the input statistics to the conv layer will remain stable.
Does anyone have any thoughts?
Thanks
