Create README.md
Browse files
README.md
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
The purpose of this copy of the MNIST small dataset [mnist_test.csv (20,000 samples) and mnist_train_small.csv (10,000 samples)] copied from Colab is simply to illustrate how WEIRD and totally deformed/unrecognizable are the 1% to 2% test samples that are difficult for a competent Vision model to correctly classify.
|
| 2 |
+
See for yourself (up to 4 misclassified test samples shown per training epoch)
|
| 3 |
+
|
| 4 |
+
Vision_model_V2.1.py
|
| 5 |
+
|
| 6 |
+
--- Hyperparameters ---
|
| 7 |
+
|
| 8 |
+
[INFO] Loading datasets...
|
| 9 |
+
[AUGMENT] Creating augmented training data...
|
| 10 |
+
[AUGMENT] Created augmentation pipeline: [RandomAffine(degrees=[-8.0, 8.0], translate=(0.07142857142857142, 0), shear=[0.0, 0.0])]
|
| 11 |
+
[AUGMENT] Original train size: 20000. New size: 40000
|
| 12 |
+
[INFO] Calculating class distribution and entropy...
|
| 13 |
+
|
| 14 |
+
--- Dataset Information ---
|
| 15 |
+
Name: MNIST (Small)
|
| 16 |
+
Source: Included in Google Colab's /sample_data directory
|
| 17 |
+
Original Train Samples 20000
|
| 18 |
+
Total Train Samples (w/ Aug) 40000
|
| 19 |
+
Test Samples 10000
|
| 20 |
+
Image Dimensions 1x28x28
|
| 21 |
+
Classes [np.int64(0), np.int64(1), np.int64(2), np.int64(3), np.int64(4), np.int64(5), np.int64(6), np.int64(7), np.int64(8), np.int64(9)]
|
| 22 |
+
Class Entropy Contrib:
|
| 23 |
+
Class 0: 0.3286
|
| 24 |
+
Class 1: 0.3540
|
| 25 |
+
Class 2: 0.3312
|
| 26 |
+
Class 3: 0.3342
|
| 27 |
+
Class 4: 0.3249
|
| 28 |
+
Class 5: 0.3087
|
| 29 |
+
Class 6: 0.3358
|
| 30 |
+
Class 7: 0.3438
|
| 31 |
+
Class 8: 0.3238
|
| 32 |
+
Class 9: 0.3343
|
| 33 |
+
Total Label Entropy: 3.3192 (Max: 3.3219)
|
| 34 |
+
============================================================
|
| 35 |
+
|
| 36 |
+
--- Starting Training ---
|
| 37 |
+
[MODEL] New best accuracy: 97.83%. Saving model to output/best_model.pt
|
| 38 |
+
Epoch [01/20] | Train Loss: 0.1843, Train Acc: 94.28% | Test Loss: 0.0667, Test Acc: 97.83% | LR: 1.00e-03
|
| 39 |
+
[ANALYSIS] Displaying up to 4 failed test samples for Epoch 1...
|
| 40 |
+

|
| 41 |
+
[PLOT] Saved failed samples plot to output/failed_samples_epoch_1.png
|
| 42 |
+
|
| 43 |
+
[MODEL] New best accuracy: 98.10%. Saving model to output/best_model.pt
|
| 44 |
+
Epoch [02/20] | Train Loss: 0.0830, Train Acc: 97.45% | Test Loss: 0.0570, Test Acc: 98.10% | LR: 1.00e-03
|
| 45 |
+
[ANALYSIS] Displaying up to 4 failed test samples for Epoch 2...
|
| 46 |
+

|
| 47 |
+
[PLOT] Saved failed samples plot to output/failed_samples_epoch_2.png
|
| 48 |
+
|
| 49 |
+
[MODEL] New best accuracy: 98.29%. Saving model to output/best_model.pt
|
| 50 |
+
Epoch [03/20] | Train Loss: 0.0589, Train Acc: 98.16% | Test Loss: 0.0529, Test Acc: 98.29% | LR: 1.00e-03
|
| 51 |
+
[ANALYSIS] Displaying up to 4 failed test samples for Epoch 3...
|
| 52 |
+

|
| 53 |
+
[PLOT] Saved failed samples plot to output/failed_samples_epoch_3.png
|
| 54 |
+
|
| 55 |
+
[MODEL] New best accuracy: 98.72%. Saving model to output/best_model.pt
|
| 56 |
+
Epoch [04/20] | Train Loss: 0.0473, Train Acc: 98.51% | Test Loss: 0.0426, Test Acc: 98.72% | LR: 1.00e-03
|
| 57 |
+
[ANALYSIS] Displaying up to 4 failed test samples for Epoch 4...
|
| 58 |
+

|
| 59 |
+
[PLOT] Saved failed samples plot to output/failed_samples_epoch_4.png
|
| 60 |
+
|
| 61 |
+
Epoch [05/20] | Train Loss: 0.0398, Train Acc: 98.71% | Test Loss: 0.0470, Test Acc: 98.54% | LR: 1.00e-03
|
| 62 |
+
[ANALYSIS] Displaying up to 4 failed test samples for Epoch 5...
|
| 63 |
+

|
| 64 |
+
[PLOT] Saved failed samples plot to output/failed_samples_epoch_5.png
|
| 65 |
+
|
| 66 |
+
[MODEL] New best accuracy: 98.75%. Saving model to output/best_model.pt
|
| 67 |
+
Epoch [06/20] | Train Loss: 0.0374, Train Acc: 98.79% | Test Loss: 0.0400, Test Acc: 98.75% | LR: 1.00e-03
|
| 68 |
+
[ANALYSIS] Displaying up to 4 failed test samples for Epoch 6...
|
| 69 |
+

|
| 70 |
+
[PLOT] Saved failed samples plot to output/failed_samples_epoch_6.png
|