A complete PyTorch implementation of a custom CNN and a ResNet-based architecture for classifying images in the CIFAR-10 dataset.
The project includes:
- Full data preprocessing pipeline
- Albumentations-based augmentation
- Model comparison between a standard CNN and a ResNet-style CNN
- Training/evaluation loop with learning rate scheduling
- Accuracy and loss visualization
- Custom CNN built manually layer-by-layer
- Residual Network (ResNet) implementation from scratch using residual blocks
- Data augmentation using Albumentations for better generalization
- Training with Adam optimizer + StepLR scheduler
- Automatic GPU detection for CUDA acceleration
- Training and testing accuracy visualization
A simple sequential convolutional model with 4 convolution blocks and batch normalization.
Implements skip connections and residual learning:
- Four residual stages (64 → 128 → 256 → 512)
- Adaptive average pooling
- Fully connected classification layer
(TBN)
Run the training notebook (includes data download and extraction)
The notebook will:
- Download and unpack CIFAR-10
- Apply augmentations
- Train both CNN and ResNet models
- Plot loss/accuracy curves
The code automatically generates:
- Training vs. test loss curves
- Training vs. test accuracy curves
MIT License © 2025 Arvin Esmaeily
You’re free to use, modify, and share this project for research and educational purposes.