How do I choose the values for mead and std when using transforms.Normalize(mean, std)?
I have seen both examples where Normalize(mean=[0.5, 0.5, 0.5], std=[0.5, 0.5, 0.5])]) are used, but also cases where Normalize(mean=[0.485, 0.456, 0.406], std=[0.229, 0.224, 0.225])]) are used.
How are these values found; should they be calculated from my data set or are they appropriate constants?
An example from our codebase looks like this:
def get_transform_eval(input_shape): return transforms.Compose( [transforms.ToPILImage(), transforms.Resize(input_shape), transforms.ToTensor(), transforms.Normalize(MEAN, STD)])