
CIFAR100 classification with modified ResNet
Transfer learning on CIFAR-100 with a modified ResNet architecture, achieving strong top-5 accuracy on 100-class image classification.
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.
I write about this kind of work — reliability, uncertainty, building things that work in production. One email per month.