HobbitLong / SupContrast

PyTorch implementation of "Supervised Contrastive Learning" (and SimCLR incidentally)
BSD 2-Clause "Simplified" License
2.98k stars 525 forks source link

the mean and std of cifar dataset #128

Open shuaiNJU opened 1 year ago

shuaiNJU commented 1 year ago

Hi, Thanks for your excellent work and code! I have a question about the mean and std of cifar dataset. For example, for CIFAR-10 dataset, why you use transforms.Normalize((0.4914, 0.4822, 0.4465), (0.2023, 0.1994, 0.2010)), instead of transforms.Normalize([x/255.0 for x in [125.3, 123.0, 113.9]], [x/255.0 for x in [63.0, 62.1, 66.7]])? I am looking forward your replay! Thanks!