I see there are some post here: Example of data.normalize for fastAI v1
Calculating New stats
Error in calculating mean and standard deviation of channels of image
But I still don’t understand the formula for it. Is it taking the number of images, except the channel? I don’t know.
I used the code to calculate it, but I guess my pictures’s size of not the same for training. It fails. Maybe I will use the same size or resizing it for dataloader. But I still don’t know how to write some code to calculate the mean and standard deviation.
my dataset:https://drive.google.com/open?id=1uYVjdra05Dpgcgmn1gSlAf8azVIeww_n
Can someone help me