Right, good question.
My first intuition would be to compute them on the raw images, because the transforms are random and would most likely not be reproduced exactly during training (unless you use a seed, which sort of breaks the randomness).
Regarding the ColorJitter transform and generally all transforms acting on the luminance etc. of the images: they don’t yet support ranged bounds (unless you compile torchvision from master), so the randomness will always be centered along the mean value of the raw images (+/- parameter given).
For the RandomRotation and generally all transforms that could pad the images with black borders: try to replace the black border by the mean value of the raw images instead, so that it doesn’t interfere on the statistics.
I think the general idea here is the same as before: compute the statistics for whatever is going to be your use case, so that during evaluation/inference of the model, the test/validation images (which wouldn’t be augmented) have similar distribution!