GitHub Repository
View source code and files
Deep Learning & Machine Learning Classification
Prakhar Chauhan | Roll Number: B23BB1032
This project analyzes the performance of Deep Learning models (ResNet-18 & ResNet-50) and Machine Learning models (SVM) on MNIST and FashionMNIST datasets under various configurations.
| Batch Size | Optimizer | Learning Rate | ResNet-18 Acc (%) | ResNet-50 Acc (%) |
|---|---|---|---|---|
| 16 | SGD | 0.001 | 98.0 | 98.6 |
| 16 | SGD | 0.0001 | 98.4 | 98.9 |
| 16 | Adam | 0.001 | 99.0 | 99.3 |
| 16 | Adam | 0.0001 | 99.2 | 99.4 |
| 32 | SGD | 0.001 | 97.9 | 98.4 |
| 32 | SGD | 0.0001 | 98.3 | 98.8 |
| 32 | Adam | 0.001 | 98.9 | 99.2 |
| 32 | Adam | 0.0001 | 99.1 | 99.3 |
| Batch Size | Optimizer | Learning Rate | ResNet-18 Acc (%) | ResNet-50 Acc (%) |
|---|---|---|---|---|
| 16 | SGD | 0.001 | 88.9 | 90.4 |
| 16 | SGD | 0.0001 | 89.4 | 91.0 |
| 16 | Adam | 0.001 | 91.38 | 92.4 |
| 16 | Adam | 0.0001 | 91.53 | 92.6 |
| 32 | SGD | 0.001 | 88.4 | 89.6 |
| 32 | SGD | 0.0001 | 89.1 | 90.6 |
| 32 | Adam | 0.001 | 90.9 | 92.0 |
| 32 | Adam | 0.0001 | 91.1 | 92.3 |
Training SVM with varying kernels (Polynomial, RBF) and hyperparameters.
| Dataset | Kernel | Best Hyperparameters | Test Accuracy (%) | Train Time (ms) |
|---|---|---|---|---|
| MNIST | Poly | C=10, degree=2 | 95.20 | 5,204.85 |
| MNIST | RBF | C=10, gamma=scale | 95.55 | 8,001.53 |
| FashionMNIST | Poly | C=10, degree=2 | 86.80 | 6,729.06 |
| FashionMNIST | RBF | C=5, gamma=scale | 87.45 | 6,820.15 |
Comparison of training time and FLOPs count for ResNet models on different hardware using FashionMNIST dataset.
| Compute | Batch | Optimizer | LR | ResNet-18 Acc | R-18 Time (ms) | R-18 FLOPs | ResNet-50 Acc | R-50 Time (ms) | R-50 FLOPs |
|---|---|---|---|---|---|---|---|---|---|
| CPU | 16 | SGD | 0.001 | 89.20% | 4,250,000 | 0.03G | 88.50% | 13,900,000 | 0.08G |
| CPU | 16 | Adam | 0.001 | 90.10% | 4,050,000 | 0.03G | 89.80% | 13,600,000 | 0.08G |
| GPU | 16 | SGD | 0.001 | 91.73% | 545,392 | 0.03G | 90.40% | 1,663,622 | 0.08G |
| GPU | 16 | Adam | 0.001 | 92.04% | 533,329 | 0.03G | 91.90% | 1,663,071 | 0.08G |