Preprocessing function of inception v3 in Keras : <p>This is preprocessing function of inception v3 in Keras. It is totally different from other models preprocessing.</p>

<pre><code>def preprocess_input(x):
    x /= 255.
    x -= 0.5
    x *= 2.
    return x
</code></pre>

<p><strong>1. Why there is no mean subtraction?</strong></p>

<p><strong>2. Why there is no RGB to BGR?</strong></p>

<p><strong>3. Mapping between [-1,1] is normal for this model?</strong></p>

<p>and this is preprocessing function of VGG and ResNet in Keras:</p>

<pre><code>def preprocess_input(x, data_format=None):
    if data_format is None:
        data_format = K.image_data_format()
    assert data_format in {'channels_last', 'channels_first'}

    if data_format == 'channels_first':
        # 'RGB'-&gt;'BGR'
        x = x[:, ::-1, :, :]
        # Zero-center by mean pixel

        x[:, 0, :, :] -= 103.939
        x[:, 1, :, :] -= 116.779
        x[:, 2, :, :] -= 123.68
    else:
        # 'RGB'-&gt;'BGR'
        x = x[:, :, :, ::-1]
        # Zero-center by mean pixel
        x[:, :, :, 0] -= 103.939
        x[:, :, :, 1] -= 116.779
        x[:, :, :, 2] -= 123.68
    return x
</code></pre>

<p>Also Caffe models use mean subtraction and RGB to BGR.</p>
