Hi Arnold, that would be the mean of all images from the training set.
If the mean was subtracted during training (so that each pixel has zero mean) then you also need to subtract the same mean (from the training set) when doing testing. Do the same if you're testing on only one image. It is a way of normalizing your data. I guess you are talking about the alexnet code from our previous conversation, I found the part of the code where the image mean is calculated. Have a look here: https://github.com/uoguelph-mlrg/theano_alexnet/blob/master/preprocessing/make_hkl.py#L34 Best, Petar On 10/08/16 19:21, Arnold Tunick wrote: > Hi, > 1) I am in the process of testing a trained and validated CNN with images from ILSVRC2012. > 2) My question is the following: What is the img_mean.npy file and what is reason for subtracting the img_mean (shape = 3L, 256L, 256L) when loading the images? > 3) Interestingly, I obtain quite different results related to the top-5 probabilities, whether I subtract the mean or not in the loading process, e.g., when I use a .hkl file (shape = 3L, 256L, 256L, 256L) containing 256 images. > 4) For each new (single) image that I load and test, do I need to generate and subtract a img_mean? > Any comments that you may offer would be helpful. > Best, > Arnold > > -- --- You received this message because you are subscribed to the Google Groups "theano-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
