Re-normalizing images

Hi,

Yes we compute the mean and std channel wise.

And about computing these values, I have used this code gathered and edited from community for online method. Actually, in my case, my data was about 20GB and I could not load whole dataset into memory so I needed to compute std and mean batch wise and then accumulate it over all batches in epoch.

Note that this approach is not accurate but between two implemented approaches, strong gives more accurate answer in respect of longer run time.
If you can load entire dataset into memory, you do not need any approximation and the approach would be different.

Ref: About Normalization using pre-trained vgg16 networks

Bests
Nik