I tried to build a neural network for a CIFAR-10 database. I used Pytorch Framework.
I have a question about of data loading step.
transform_train = T.Compose([
T.RandomCrop(32, padding=4),
T.RandomHorizontalFlip(),
T.ToTensor(),
T.Normalize((0.4914, 0.4822, 0.4465), (0.2023, 0.1994, 0.2010)),
])
trainset = tv.datasets.CIFAR10(root=root, train=True, download=True, transform=transform_train)
This is a normal step for data loading step. While loading data, I am normalizing values. At the beginning of the my project I found below row.
T.Normalize((0.5, 0.5, 0.5), (0.5, 0.5, 0.5))
After I searched better transform values, I found this values.
T.Normalize((0.4914, 0.4822, 0.4465), (0.2023, 0.1994, 0.2010))
I did not find an explanation why these values were used. Do you have a description of these values?
I think you can have a look here:
The first three values are the means over each channel, while the second triple are the standard deviations.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With