I want to use mean subtraction and standardization as a normalization for my CNN model. I'm working on Keras classifying images.
However, I don't yet fully understand the difference between using mean subtraction, standardization and simple process such as rescaling images =/255.
In this question it was mentioned that there are three ways to do it:
np.mean(x) # calculates the mean of the array x
x-np.mean(x) # this is equivalent to subtracting the mean of x from each value in x
x-=np.mean(x) # the -= can be read as x = x- np.mean(x)
What I'm currently using is simple rescale:
train_data = train_data / 255
But my model performance is low. So, I decided to change the normalization and use mean subtraction but I don't know how to do it for a 3D array.