A convolutional neural network (CNN) trained on CIFAR-10 with PyTorch.
Object Recognition in Images - Identify the subject of 60,000 labeled images See more
Input: 3×32×32 image (CIFAR-10)
Kernel size: All Conv2d layers use 3×3 kernels
Conv2d(3 → 32, 3×3)+ SiLU + BatchNormConv2d(32 → 32, 3×3)+ SiLU + BatchNorm- MaxPooling + Dropout
Conv2d(32 → 64, 3×3)+ SiLU + BatchNormConv2d(64 → 64, 3×3)+ SiLU + BatchNorm- MaxPooling + Dropout
Conv2d(64 → 128, 3×3)+ SiLU + BatchNormConv2d(128 → 128, 3×3)+ SiLU + BatchNormConv2d(128 → 128, 3×3)+ SiLU + BatchNorm- MaxPooling + Dropout
Conv2d(128 → 256, 3×3)+ SiLU + BatchNormConv2d(256 → 256, 3×3)+ SiLU + BatchNormConv2d(256 → 256, 3×3)+ SiLU + BatchNorm- MaxPooling + Dropout
FlattenLinear(1024 → 512)+ SiLULinear(512 → 10)
Test Accuracy: ~90% after 100 epochs With:
BATCH_SIZE_TRAIN = 256
BATCH_SIZE_TEST = 64
LEARNING_RATE = 0.001
NUM_EPOCHS = 200
LR_GAMMA = 0.96
pip install -r requirements.txtOnce dependencies are installed, you can train the model using:
python train.py
After training, you can evaluate the model on the CIFAR-10 test set or your own model:
python eval.py