How do you get mean and standard deviation of pixels of CIFAR10 datset

Respected Akash sir,
In Deep Learning lesson 5,While doing Data normalization …

How do you calculated the mean and standard deviation?
Because you directly declared them in stats variable.
Please explain how to calculate mean and deviation of image pixel tensors .so that we will be able to apply this in our other models.

Link to referenced notebook, because it’s missing in the original post.
You could use np.mean() and np.std() to calculate these values.

The means and standard deviations are calculated from all images, for each channel (3 of them) separately. That’s why there are 6 values in total.