-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathevaluation_allmodels.txt
More file actions
100 lines (85 loc) · 9.29 KB
/
evaluation_allmodels.txt
File metadata and controls
100 lines (85 loc) · 9.29 KB
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
(base) C:\Users\Gading\Downloads\final_DL>python evaluate.py
============================================================
Loading TinyImageNet test data...
============================================================
TinyImageNet loaded:
Training samples: 100000
Validation samples: 10000
Test samples: 10000
Number of classes: 200
============================================================
Loading Baseline B0 TinyImageNet from ./checkpoints\baseline_b0_tinyimagenet\best_model.pth
============================================================
Loading student model: efficientnet_b0
Parameters: 4,263,748
C:\Users\Gading\Downloads\final_DL\evaluate.py:476: FutureWarning: You are using `torch.load` with `weights_only=False` (the current default value), which uses the default pickle module implicitly. It is possible to construct malicious pickle data which will execute arbitrary code during unpickling (See https://github.com/pytorch/pytorch/blob/main/SECURITY.md#untrusted-models for more details). In a future release, the default value for `weights_only` will be flipped to `True`. This limits the functions that could be executed during unpickling. Arbitrary objects will no longer be allowed to be loaded via this mode unless they are explicitly allowlisted by the user via `torch.serialization.add_safe_globals`. We recommend you start setting `weights_only=True` for any use case where you don't have full control of the loaded file. Please open an issue on GitHub for any issues related to this experimental feature.
state = torch.load(ckpt, map_location=device)
Evaluating Baseline B0 TinyImageNet...
Testing: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████| 40/40 [00:31<00:00, 1.27it/s]
Baseline B0 TinyImageNet Results:
Top-1 Accuracy: 55.98%
Top-5 Accuracy: 79.54%
F1 Score (Macro): 55.88%
Parameters: 4,263,748
Model Size: 16.43 MB
Inference Time: 10.67 ± 1.87 ms
============================================================
Loading Vanilla Distilled B0 from ./checkpoints\distilled_b0\best_model.pth
============================================================
C:\Users\Gading\Downloads\final_DL\evaluate.py:476: FutureWarning: You are using `torch.load` with `weights_only=False` (the current default value), which uses the default pickle module implicitly. It is possible to construct malicious pickle data which will execute arbitrary code during unpickling (See https://github.com/pytorch/pytorch/blob/main/SECURITY.md#untrusted-models for more details). In a future release, the default value for `weights_only` will be flipped to `True`. This limits the functions that could be executed during unpickling. Arbitrary objects will no longer be allowed to be loaded via this mode unless they are explicitly allowlisted by the user via `torch.serialization.add_safe_globals`. We recommend you start setting `weights_only=True` for any use case where you don't have full control of the loaded file. Please open an issue on GitHub for any issues related to this experimental feature.
state = torch.load(ckpt, map_location=device)
Evaluating Vanilla Distilled B0...
Testing: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████| 40/40 [00:31<00:00, 1.29it/s]
Vanilla Distilled B0 Results:
Top-1 Accuracy: 61.58%
Top-5 Accuracy: 83.87%
F1 Score (Macro): 61.21%
Parameters: 4,263,748
Model Size: 16.43 MB
Inference Time: 11.09 ± 2.37 ms
============================================================
Loading AKTP Distilled B0 from ./checkpoints_aktp\b0_aktp_tiny_best.pth
============================================================
C:\Users\Gading\Downloads\final_DL\evaluate.py:476: FutureWarning: You are using `torch.load` with `weights_only=False` (the current default value), which uses the default pickle module implicitly. It is possible to construct malicious pickle data which will execute arbitrary code during unpickling (See https://github.com/pytorch/pytorch/blob/main/SECURITY.md#untrusted-models for more details). In a future release, the default value for `weights_only` will be flipped to `True`. This limits the functions that could be executed during unpickling. Arbitrary objects will no longer be allowed to be loaded via this mode unless they are explicitly allowlisted by the user via `torch.serialization.add_safe_globals`. We recommend you start setting `weights_only=True` for any use case where you don't have full control of the loaded file. Please open an issue on GitHub for any issues related to this experimental feature.
state = torch.load(ckpt, map_location=device)
Evaluating AKTP Distilled B0...
Testing: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████| 40/40 [00:31<00:00, 1.28it/s]
AKTP Distilled B0 Results:
Top-1 Accuracy: 63.20%
Top-5 Accuracy: 82.31%
F1 Score (Macro): 63.14%
Parameters: 4,263,748
Model Size: 16.43 MB
Inference Time: 10.34 ± 1.86 ms
============================================================
Loading Teacher EfficientNet-B2 from ./checkpoints_aktp\teacher_b2_tiny.pth
============================================================
C:\Users\Gading\Downloads\final_DL\evaluate.py:476: FutureWarning: You are using `torch.load` with `weights_only=False` (the current default value), which uses the default pickle module implicitly. It is possible to construct malicious pickle data which will execute arbitrary code during unpickling (See https://github.com/pytorch/pytorch/blob/main/SECURITY.md#untrusted-models for more details). In a future release, the default value for `weights_only` will be flipped to `True`. This limits the functions that could be executed during unpickling. Arbitrary objects will no longer be allowed to be loaded via this mode unless they are explicitly allowlisted by the user via `torch.serialization.add_safe_globals`. We recommend you start setting `weights_only=True` for any use case where you don't have full control of the loaded file. Please open an issue on GitHub for any issues related to this experimental feature.
state = torch.load(ckpt, map_location=device)
Evaluating Teacher EfficientNet-B2...
Testing: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████| 40/40 [00:33<00:00, 1.18it/s]
Teacher EfficientNet-B2 Results:
Top-1 Accuracy: 61.08%
Top-5 Accuracy: 82.70%
F1 Score (Macro): 60.92%
Parameters: 7,982,794
Model Size: 30.71 MB
Inference Time: 15.32 ± 2.60 ms
============================================================
Loading Teacher ResNet18 from ./checkpoints_aktp\teacher_r18_tiny.pth
============================================================
C:\Users\Gading\Downloads\final_DL\evaluate.py:476: FutureWarning: You are using `torch.load` with `weights_only=False` (the current default value), which uses the default pickle module implicitly. It is possible to construct malicious pickle data which will execute arbitrary code during unpickling (See https://github.com/pytorch/pytorch/blob/main/SECURITY.md#untrusted-models for more details). In a future release, the default value for `weights_only` will be flipped to `True`. This limits the functions that could be executed during unpickling. Arbitrary objects will no longer be allowed to be loaded via this mode unless they are explicitly allowlisted by the user via `torch.serialization.add_safe_globals`. We recommend you start setting `weights_only=True` for any use case where you don't have full control of the loaded file. Please open an issue on GitHub for any issues related to this experimental feature.
state = torch.load(ckpt, map_location=device)
Evaluating Teacher ResNet18...
Testing: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████| 40/40 [00:31<00:00, 1.29it/s]
Teacher ResNet18 Results:
Top-1 Accuracy: 52.21%
Top-5 Accuracy: 74.99%
F1 Score (Macro): 52.14%
Parameters: 11,279,112
Model Size: 43.06 MB
Inference Time: 3.21 ± 0.29 ms
Aggregated results saved to ./results\comparison_results_all.json
Saved Top-1 Accuracy Comparison to ./results\metrics_top1_all.png
Saved Top-5 Accuracy Comparison to ./results\metrics_top5_all.png
Saved F1 Macro Comparison to ./results\metrics_f1_all.png