CIFAR100 classification with modified ResNet
1- Data Normalization:
CIFAR100_TRAIN_MEAN = (0.4914, 0.4822, 0.4465)
CIFAR100_TRAIN_STD = (0.2023, 0.1994, 0.2010)
Add this line to the transfer.compose for test/train data:
transforms.Normalize(CIFAR100_TRAIN_MEAN, CIFAR100_TRAIN_STD )
2- Data Augmentation:
Add this code to transfer.compose
transforms.RandomCrop(32, padding=4),
transforms.RandomHorizontalFlip()
3- Deeper network
I use the following architecture
4- Normalization layer:
I use 2D normalization layer after every conv2 layer and 1D version after linear except the last one.
5- Early Stopping
I train the network for 50 epochs. I use the validation result to evaluate when to stop training. As in overfitting the training error may reduce, but it is not learned to distinguish classes. We use new untouched data to evaluate how our network is working.