I'm learning batchnormalisation and dropout. Saw this https://www.kaggle.com/ryanholbrook/dropout-and-batch-normalization.
The model
model = keras.Sequential([
layers.Dense(1024, activation='relu', input_shape=[11]),
layers.Dropout(0.3),
layers.BatchNormalization(),
layers.Dense(1024, activation='relu'),
layers.Dropout(0.3),
layers.BatchNormalization(),
layers.Dense(1024, activation='relu'),
layers.Dropout(0.3),
layers.BatchNormalization(),
layers.Dense(1),
])
My question is do we put dropout before batchnormalization (BN) or after ? Same results ?
My understand is that dropout will "deactivate" the neuron in the next layer (pardon my terminology). So if I put before BN, would the BN be normalising incorrectly since it's not the full output from the previous layer.
So we should put dropout after BN ? Does it matter ?