File size: 4,421 Bytes
b79c88a
ad92ad5
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5fa96ba
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
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 sample_data folder in Google 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.
See for yourself (up to 4 misclassified test samples shown per training epoch)

Vision_model_V2.1.py

--- Hyperparameters ---

[INFO] Loading datasets...
[AUGMENT] Creating augmented training data...
[AUGMENT] Created augmentation pipeline: [RandomAffine(degrees=[-8.0, 8.0], translate=(0.07142857142857142, 0), shear=[0.0, 0.0])]
[AUGMENT] Original train size: 20000. New size: 40000
[INFO] Calculating class distribution and entropy...

--- Dataset Information ---
  Name:                        MNIST (Small)
  Source:                      Included in Google Colab's /sample_data directory
  Original Train Samples      20000
  Total Train Samples (w/ Aug) 40000
  Test Samples                10000
  Image Dimensions            1x28x28
  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)]
  Class Entropy Contrib:
    Class 0: 0.3286
    Class 1: 0.3540
    Class 2: 0.3312
    Class 3: 0.3342
    Class 4: 0.3249
    Class 5: 0.3087
    Class 6: 0.3358
    Class 7: 0.3438
    Class 8: 0.3238
    Class 9: 0.3343
  Total Label Entropy: 3.3192 (Max: 3.3219)
============================================================

--- Starting Training ---
[MODEL] New best accuracy: 97.83%. Saving model to output/best_model.pt
Epoch [01/20] | Train Loss: 0.1843, Train Acc: 94.28% | Test Loss: 0.0667, Test Acc: 97.83% | LR: 1.00e-03
[ANALYSIS] Displaying up to 4 failed test samples for Epoch 1...
![image/png](https://cdn-uploads.huggingface.co/production/uploads/66033315803114181a72fe6e/OLBMTQkWYiyVRz4vjOd42.png)
[PLOT] Saved failed samples plot to output/failed_samples_epoch_1.png

[MODEL] New best accuracy: 98.10%. Saving model to output/best_model.pt
Epoch [02/20] | Train Loss: 0.0830, Train Acc: 97.45% | Test Loss: 0.0570, Test Acc: 98.10% | LR: 1.00e-03
[ANALYSIS] Displaying up to 4 failed test samples for Epoch 2...
![image/png](https://cdn-uploads.huggingface.co/production/uploads/66033315803114181a72fe6e/7lx_cz0k57DNd3cXkV4D5.png)
[PLOT] Saved failed samples plot to output/failed_samples_epoch_2.png

[MODEL] New best accuracy: 98.29%. Saving model to output/best_model.pt
Epoch [03/20] | Train Loss: 0.0589, Train Acc: 98.16% | Test Loss: 0.0529, Test Acc: 98.29% | LR: 1.00e-03
[ANALYSIS] Displaying up to 4 failed test samples for Epoch 3...
![image/png](https://cdn-uploads.huggingface.co/production/uploads/66033315803114181a72fe6e/f0JsAwaW9fwNMiWjIe42g.png)
[PLOT] Saved failed samples plot to output/failed_samples_epoch_3.png

[MODEL] New best accuracy: 98.72%. Saving model to output/best_model.pt
Epoch [04/20] | Train Loss: 0.0473, Train Acc: 98.51% | Test Loss: 0.0426, Test Acc: 98.72% | LR: 1.00e-03
[ANALYSIS] Displaying up to 4 failed test samples for Epoch 4...
![image/png](https://cdn-uploads.huggingface.co/production/uploads/66033315803114181a72fe6e/N_CKo2SKBzPq-Yx4tD5YE.png)
[PLOT] Saved failed samples plot to output/failed_samples_epoch_4.png

Epoch [05/20] | Train Loss: 0.0398, Train Acc: 98.71% | Test Loss: 0.0470, Test Acc: 98.54% | LR: 1.00e-03
[ANALYSIS] Displaying up to 4 failed test samples for Epoch 5...
![image/png](https://cdn-uploads.huggingface.co/production/uploads/66033315803114181a72fe6e/Eq2rZIziH80AL1F45zs7t.png)
[PLOT] Saved failed samples plot to output/failed_samples_epoch_5.png

[MODEL] New best accuracy: 98.75%. Saving model to output/best_model.pt
Epoch [06/20] | Train Loss: 0.0374, Train Acc: 98.79% | Test Loss: 0.0400, Test Acc: 98.75% | LR: 1.00e-03
[ANALYSIS] Displaying up to 4 failed test samples for Epoch 6...
![image/png](https://cdn-uploads.huggingface.co/production/uploads/66033315803114181a72fe6e/rwF4seg194UcjKx5mevVu.png)
[PLOT] Saved failed samples plot to output/failed_samples_epoch_6.png

Confusion Matrix:
![image/png](https://cdn-uploads.huggingface.co/production/uploads/66033315803114181a72fe6e/k4wFM-wIo75Vh7pTLMl8k.png)

Training Telemetry Plot: 
![image/png](https://cdn-uploads.huggingface.co/production/uploads/66033315803114181a72fe6e/89GnKcskHiA2S_BOJ2O82.png)