Hello,
Well that’s one possibility, and other possibility is to iterate over you dataset without creating a loader. Note also that this step is very fast (in comparison to the total training duration), and it helps improving the quality of your final model. As @ptrblck said, if you use real RGB images dataset, that is similar to ImageNet, you can use the same stats.