<p>The order of the layers effects the convergence of your model and hence your results. Based on the Batch Normalization <a href="https://arxiv.org/pdf/1502.03167.pdf" rel="nofollow noreferrer">paper</a>, the author suggests that the Batch Normalization should be implemented before the activation function. Since Dropout is applied after computing the activations. Then the right order of layers are:</p>

<ul>
<li>Dense or Conv</li>
<li>Batch Normalization</li>
<li>Activation</li>
<li>Droptout.</li>
</ul>

<p>In code using keras, here is how you write it sequentially:</p>

<pre><code>model = Sequential()
model.add(Dense(n_neurons, input_shape=your_input_shape, use_bias=False))  # it is important to disable bias when using Batch Normalization
model.add(BatchNormalization())
model.add(Activation('relu'))  # for example
model.add(Dropout(rate=0.25))
</code></pre>

<p>Batch Normalization helps to avoid Vanishing/Exploding Gradients when training your model. Therefore, it is specially important if you have many layers. You can read the provided paper for more details.</p>
Dropout & batch normalization - does the ordering of layers matter?
<p>I was building a neural network model and my question is that by any chance the ordering of the dropout and batch normalization layers actually affect the model?
Will putting the dropout layer before batch-normalization layer (or vice-versa) actually make any difference to the output of the model if I am using ROC-AUC score as my metric of measurement.</p>

<p>I expect the output to have a large (ROC-AUC) score and want to know that will it be affected in any way by the ordering of the layers.</p>