<p>It should be pooling first, normalization second.</p>
<p>The original code link in the question no longer works, but I'm assuming the normalization being referred to is batch normalization. Though, the main idea will probably apply to other normalization as well. As noted by the batch normalization authors in <a href="https://arxiv.org/pdf/1502.03167.pdf" rel="noreferrer">the paper introducing batch normalization</a>, one of the main purposes is &quot;normalizing layer inputs&quot;. The simplified version of the idea being: if the inputs to each layer have a nice, reliable distribution of values, the network can train more easily. Putting the normalization second allows for this to happen.</p>
<p>As a concrete example, we can consider the activations <code>[0, 99, 99, 100]</code>. To keep things simple, a 0-1 normalization will be used. A max pooling with kernel 2 will be used. If the values are first normalized, we get <code>[0, 0.99, 0.99, 1]</code>. Then pooling gives <code>[0.99, 1]</code>. This does not provide the nice distribution of inputs to the next layer. If we instead pool first, we get <code>[99, 100]</code>. Then normalizing gives <code>[0, 1]</code>. Which means we can then control the distribution of the inputs to the next layer to be what we want them to be to best promote training.</p>
The order of pooling and normalization layer in convnet
<p>I'm looking at <a href="https://github.com/tensorflow/models/blob/master/tutorials/image/cifar10/cifar10.py" rel="noreferrer">TensorFlow implementation of ORC on CIFAR-10</a>, and I noticed that after the first convnet layer, they do pooling, then normalization, but after the second layer, they do normalization, then pooling.</p>

<p>I'm just wondering what would be the rationale behind this, and any tips on when/why we should choose to do norm before pool would be greatly appreciated. Thanks!</p>