<p>Neural networks (including CNNs) are models with thousands of parameters which we try to optimize with gradient descent. Those models are able to fit a lot of different functions by having a non-linearity φ at their nodes. Without a non-linear activation function, the network collapses to a linear function in total. This means we need the non-linearity for most interesting problems.</p>

<p>Common choices for φ are the logistic function, tanh or ReLU. All of them have the most interesting region around 0. This is where the gradient either is big enough to learn quickly or where a non-linearity is at all in case of ReLU. Weight initialization schemes like <a href="http://jmlr.org/proceedings/papers/v9/glorot10a/glorot10a.pdf" rel="nofollow noreferrer">Glorot initialization</a> try to make the network start at a good point for the optimization. Other techniques like <a href="https://arxiv.org/abs/1502.03167" rel="nofollow noreferrer">Batch Normalization</a> also keep the mean of the nodes input around 0.</p>

<p>So you compute (and subtract) the mean of the image so that the first computing nodes get data which "behaves well". It has a mean of 0 and thus the intuition is that this helps the optimization process.</p>

<p>In theory, a network can be able to "subtract" the mean by itself. So if you train long enough, this should not matter too much. However, depending on the activation function "long enough" can be important.</p>
Why should we compute the image mean when we train CNNs?
<p>When I use caffe for image classification, it often computes the image mean. Why is that the case?</p>

<p>Someone said that it can improve the accuracy, but I don't understand why this should be the case.</p>