How can I calculate the mean and variance of samples in each class

Hi I want to access the data in each class in CIFAR10 dataset using pytorch to compute the mean and varience of each class endividually. Any sample code would be appreciated.
Thanks in advance