lewtun HF staff lewtun HF staff commited on
Commit
b3883ca
0 Parent(s):

Duplicate from autoevaluate/image-multi-class-classification

Browse files

Co-authored-by: Lewis Tunstall <lewtun@users.noreply.huggingface.co>

.gitattributes ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ *.7z filter=lfs diff=lfs merge=lfs -text
2
+ *.arrow filter=lfs diff=lfs merge=lfs -text
3
+ *.bin filter=lfs diff=lfs merge=lfs -text
4
+ *.bz2 filter=lfs diff=lfs merge=lfs -text
5
+ *.ftz filter=lfs diff=lfs merge=lfs -text
6
+ *.gz filter=lfs diff=lfs merge=lfs -text
7
+ *.h5 filter=lfs diff=lfs merge=lfs -text
8
+ *.joblib filter=lfs diff=lfs merge=lfs -text
9
+ *.lfs.* filter=lfs diff=lfs merge=lfs -text
10
+ *.model filter=lfs diff=lfs merge=lfs -text
11
+ *.msgpack filter=lfs diff=lfs merge=lfs -text
12
+ *.onnx filter=lfs diff=lfs merge=lfs -text
13
+ *.ot filter=lfs diff=lfs merge=lfs -text
14
+ *.parquet filter=lfs diff=lfs merge=lfs -text
15
+ *.pb filter=lfs diff=lfs merge=lfs -text
16
+ *.pt filter=lfs diff=lfs merge=lfs -text
17
+ *.pth filter=lfs diff=lfs merge=lfs -text
18
+ *.rar filter=lfs diff=lfs merge=lfs -text
19
+ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
20
+ *.tar.* filter=lfs diff=lfs merge=lfs -text
21
+ *.tflite filter=lfs diff=lfs merge=lfs -text
22
+ *.tgz filter=lfs diff=lfs merge=lfs -text
23
+ *.wasm filter=lfs diff=lfs merge=lfs -text
24
+ *.xz filter=lfs diff=lfs merge=lfs -text
25
+ *.zip filter=lfs diff=lfs merge=lfs -text
26
+ *.zstandard filter=lfs diff=lfs merge=lfs -text
27
+ *tfevents* filter=lfs diff=lfs merge=lfs -text
.gitignore ADDED
@@ -0,0 +1 @@
 
 
1
+ checkpoint-*/
README.md ADDED
@@ -0,0 +1,77 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ tags:
4
+ - generated_from_trainer
5
+ datasets:
6
+ - mnist
7
+ - autoevaluate/mnist-sample
8
+ metrics:
9
+ - accuracy
10
+ model-index:
11
+ - name: image-classification
12
+ results:
13
+ - task:
14
+ name: Image Classification
15
+ type: image-classification
16
+ dataset:
17
+ name: mnist
18
+ type: mnist
19
+ args: mnist
20
+ metrics:
21
+ - name: Accuracy
22
+ type: accuracy
23
+ value: 0.9833333333333333
24
+ duplicated_from: autoevaluate/image-multi-class-classification
25
+ ---
26
+
27
+ <!-- This model card has been generated automatically according to the information the Trainer had access to. You
28
+ should probably proofread and complete it, then remove this comment. -->
29
+
30
+ # image-classification
31
+
32
+ This model is a fine-tuned version of [microsoft/swin-tiny-patch4-window7-224](https://huggingface.co/microsoft/swin-tiny-patch4-window7-224) on the mnist dataset.
33
+ It achieves the following results on the evaluation set:
34
+ - Loss: 0.0556
35
+ - Accuracy: 0.9833
36
+
37
+ ## Model description
38
+
39
+ More information needed
40
+
41
+ ## Intended uses & limitations
42
+
43
+ More information needed
44
+
45
+ ## Training and evaluation data
46
+
47
+ More information needed
48
+
49
+ ## Training procedure
50
+
51
+ ### Training hyperparameters
52
+
53
+ The following hyperparameters were used during training:
54
+ - learning_rate: 5e-05
55
+ - train_batch_size: 32
56
+ - eval_batch_size: 32
57
+ - seed: 42
58
+ - gradient_accumulation_steps: 4
59
+ - total_train_batch_size: 128
60
+ - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
61
+ - lr_scheduler_type: linear
62
+ - lr_scheduler_warmup_ratio: 0.1
63
+ - num_epochs: 1
64
+
65
+ ### Training results
66
+
67
+ | Training Loss | Epoch | Step | Validation Loss | Accuracy |
68
+ |:-------------:|:-----:|:----:|:---------------:|:--------:|
69
+ | 0.3743 | 1.0 | 422 | 0.0556 | 0.9833 |
70
+
71
+
72
+ ### Framework versions
73
+
74
+ - Transformers 4.20.0
75
+ - Pytorch 1.11.0+cu113
76
+ - Datasets 2.3.2
77
+ - Tokenizers 0.12.1
all_results.json ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "epoch": 1.0,
3
+ "eval_accuracy": 0.9833333333333333,
4
+ "eval_loss": 0.05558411777019501,
5
+ "eval_runtime": 38.4928,
6
+ "eval_samples_per_second": 155.873,
7
+ "eval_steps_per_second": 4.884,
8
+ "total_flos": 1.342523444871168e+18,
9
+ "train_loss": 0.6594652506694975,
10
+ "train_runtime": 822.8009,
11
+ "train_samples_per_second": 65.629,
12
+ "train_steps_per_second": 0.513
13
+ }
config.json ADDED
@@ -0,0 +1,64 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "microsoft/swin-tiny-patch4-window7-224",
3
+ "architectures": [
4
+ "SwinForImageClassification"
5
+ ],
6
+ "attention_probs_dropout_prob": 0.0,
7
+ "depths": [
8
+ 2,
9
+ 2,
10
+ 6,
11
+ 2
12
+ ],
13
+ "drop_path_rate": 0.1,
14
+ "embed_dim": 96,
15
+ "encoder_stride": 32,
16
+ "hidden_act": "gelu",
17
+ "hidden_dropout_prob": 0.0,
18
+ "hidden_size": 768,
19
+ "id2label": {
20
+ "0": "0",
21
+ "1": "1",
22
+ "2": "2",
23
+ "3": "3",
24
+ "4": "4",
25
+ "5": "5",
26
+ "6": "6",
27
+ "7": "7",
28
+ "8": "8",
29
+ "9": "9"
30
+ },
31
+ "image_size": 224,
32
+ "initializer_range": 0.02,
33
+ "label2id": {
34
+ "0": 0,
35
+ "1": 1,
36
+ "2": 2,
37
+ "3": 3,
38
+ "4": 4,
39
+ "5": 5,
40
+ "6": 6,
41
+ "7": 7,
42
+ "8": 8,
43
+ "9": 9
44
+ },
45
+ "layer_norm_eps": 1e-05,
46
+ "mlp_ratio": 4.0,
47
+ "model_type": "swin",
48
+ "num_channels": 3,
49
+ "num_heads": [
50
+ 3,
51
+ 6,
52
+ 12,
53
+ 24
54
+ ],
55
+ "num_layers": 4,
56
+ "patch_size": 4,
57
+ "path_norm": true,
58
+ "problem_type": "single_label_classification",
59
+ "qkv_bias": true,
60
+ "torch_dtype": "float32",
61
+ "transformers_version": "4.20.0",
62
+ "use_absolute_embeddings": false,
63
+ "window_size": 7
64
+ }
eval_results.json ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "epoch": 1.0,
3
+ "eval_accuracy": 0.9833333333333333,
4
+ "eval_loss": 0.05558411777019501,
5
+ "eval_runtime": 38.4928,
6
+ "eval_samples_per_second": 155.873,
7
+ "eval_steps_per_second": 4.884
8
+ }
preprocessor_config.json ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "do_normalize": true,
3
+ "do_resize": true,
4
+ "feature_extractor_type": "ViTFeatureExtractor",
5
+ "image_mean": [
6
+ 0.485,
7
+ 0.456,
8
+ 0.406
9
+ ],
10
+ "image_std": [
11
+ 0.229,
12
+ 0.224,
13
+ 0.225
14
+ ],
15
+ "resample": 3,
16
+ "size": 224
17
+ }
pytorch_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:611bf6c977a11e8ecd3ca5f56d694dca8769e5bbd6510d3280968528eb4f47c2
3
+ size 110417455
runs/Jun21_08-52-13_15d408464ff9/1655801577.142551/events.out.tfevents.1655801577.15d408464ff9.75.1 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:fc9ea6892fc914f58a13bd743e83935fc218594efeb5324ce45c26bd83b69b11
3
+ size 5365
runs/Jun21_08-52-13_15d408464ff9/events.out.tfevents.1655801577.15d408464ff9.75.0 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:97ab8cd1d74c5c6a815e9cbbc63b2065b52be1ef314270daf6ac411af8fea034
3
+ size 4205
runs/Jun21_08-53-46_15d408464ff9/1655801639.1869574/events.out.tfevents.1655801639.15d408464ff9.75.3 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:993782d56ac79b6cee4e96074c8fac867793e4e852a9b97c86db0a2c9b581ac2
3
+ size 5365
runs/Jun21_08-53-46_15d408464ff9/events.out.tfevents.1655801639.15d408464ff9.75.2 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b4c4fa32ccbef8fcbb820c8410492e70c87050e5cc761e8cb6b1e37ac9eabb4a
3
+ size 4051
runs/Jun21_08-55-37_15d408464ff9/1655801747.2972329/events.out.tfevents.1655801747.15d408464ff9.75.5 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:791e1e41bb3f8adcbf45d32cbe639a70d2d35ebda46f530b98fc579073d480ec
3
+ size 5365
runs/Jun21_08-55-37_15d408464ff9/events.out.tfevents.1655801747.15d408464ff9.75.4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c830b24b3492654f9c80e58ca1cb3004aa1bafa9a5f731dcba7c50c2a58c7319
3
+ size 3842
runs/Jun21_08-56-34_15d408464ff9/1655801813.5448782/events.out.tfevents.1655801813.15d408464ff9.75.7 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4012a50925ced1eb5006e819b96a73343aecfddb645d4883b15810f1a77b9b68
3
+ size 5365
runs/Jun21_08-56-34_15d408464ff9/events.out.tfevents.1655801813.15d408464ff9.75.6 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:18204d0799e7348765e34fb8bdb4c1edc27ac1d4588dcea55312a8fac54e364f
3
+ size 11286
runs/Jun21_08-56-34_15d408464ff9/events.out.tfevents.1655802836.15d408464ff9.75.8 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c6fa3a3eb5bc736a4eccbd43fcdd83150ea5a737aefb417c12a5cbb678d19b64
3
+ size 363
train_results.json ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "epoch": 1.0,
3
+ "total_flos": 1.342523444871168e+18,
4
+ "train_loss": 0.6594652506694975,
5
+ "train_runtime": 822.8009,
6
+ "train_samples_per_second": 65.629,
7
+ "train_steps_per_second": 0.513
8
+ }
trainer_state.json ADDED
@@ -0,0 +1,286 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "best_metric": 0.9833333333333333,
3
+ "best_model_checkpoint": "image-classification/checkpoint-422",
4
+ "epoch": 1.0,
5
+ "global_step": 422,
6
+ "is_hyper_param_search": false,
7
+ "is_local_process_zero": true,
8
+ "is_world_process_zero": true,
9
+ "log_history": [
10
+ {
11
+ "epoch": 0.02,
12
+ "learning_rate": 1.1627906976744187e-05,
13
+ "loss": 2.3142,
14
+ "step": 10
15
+ },
16
+ {
17
+ "epoch": 0.05,
18
+ "learning_rate": 2.3255813953488374e-05,
19
+ "loss": 2.2058,
20
+ "step": 20
21
+ },
22
+ {
23
+ "epoch": 0.07,
24
+ "learning_rate": 3.488372093023256e-05,
25
+ "loss": 1.893,
26
+ "step": 30
27
+ },
28
+ {
29
+ "epoch": 0.09,
30
+ "learning_rate": 4.651162790697675e-05,
31
+ "loss": 1.4224,
32
+ "step": 40
33
+ },
34
+ {
35
+ "epoch": 0.12,
36
+ "learning_rate": 4.907651715039578e-05,
37
+ "loss": 1.0782,
38
+ "step": 50
39
+ },
40
+ {
41
+ "epoch": 0.14,
42
+ "learning_rate": 4.775725593667547e-05,
43
+ "loss": 0.877,
44
+ "step": 60
45
+ },
46
+ {
47
+ "epoch": 0.17,
48
+ "learning_rate": 4.6437994722955145e-05,
49
+ "loss": 0.778,
50
+ "step": 70
51
+ },
52
+ {
53
+ "epoch": 0.19,
54
+ "learning_rate": 4.511873350923483e-05,
55
+ "loss": 0.6735,
56
+ "step": 80
57
+ },
58
+ {
59
+ "epoch": 0.21,
60
+ "learning_rate": 4.379947229551452e-05,
61
+ "loss": 0.6688,
62
+ "step": 90
63
+ },
64
+ {
65
+ "epoch": 0.24,
66
+ "learning_rate": 4.2480211081794194e-05,
67
+ "loss": 0.6841,
68
+ "step": 100
69
+ },
70
+ {
71
+ "epoch": 0.26,
72
+ "learning_rate": 4.116094986807388e-05,
73
+ "loss": 0.5935,
74
+ "step": 110
75
+ },
76
+ {
77
+ "epoch": 0.28,
78
+ "learning_rate": 3.984168865435357e-05,
79
+ "loss": 0.5521,
80
+ "step": 120
81
+ },
82
+ {
83
+ "epoch": 0.31,
84
+ "learning_rate": 3.8522427440633244e-05,
85
+ "loss": 0.5555,
86
+ "step": 130
87
+ },
88
+ {
89
+ "epoch": 0.33,
90
+ "learning_rate": 3.7203166226912934e-05,
91
+ "loss": 0.5483,
92
+ "step": 140
93
+ },
94
+ {
95
+ "epoch": 0.36,
96
+ "learning_rate": 3.588390501319262e-05,
97
+ "loss": 0.5371,
98
+ "step": 150
99
+ },
100
+ {
101
+ "epoch": 0.38,
102
+ "learning_rate": 3.456464379947229e-05,
103
+ "loss": 0.5485,
104
+ "step": 160
105
+ },
106
+ {
107
+ "epoch": 0.4,
108
+ "learning_rate": 3.324538258575198e-05,
109
+ "loss": 0.526,
110
+ "step": 170
111
+ },
112
+ {
113
+ "epoch": 0.43,
114
+ "learning_rate": 3.1926121372031666e-05,
115
+ "loss": 0.5255,
116
+ "step": 180
117
+ },
118
+ {
119
+ "epoch": 0.45,
120
+ "learning_rate": 3.060686015831134e-05,
121
+ "loss": 0.5133,
122
+ "step": 190
123
+ },
124
+ {
125
+ "epoch": 0.47,
126
+ "learning_rate": 2.9287598944591033e-05,
127
+ "loss": 0.4857,
128
+ "step": 200
129
+ },
130
+ {
131
+ "epoch": 0.5,
132
+ "learning_rate": 2.7968337730870712e-05,
133
+ "loss": 0.4806,
134
+ "step": 210
135
+ },
136
+ {
137
+ "epoch": 0.52,
138
+ "learning_rate": 2.6649076517150396e-05,
139
+ "loss": 0.4573,
140
+ "step": 220
141
+ },
142
+ {
143
+ "epoch": 0.55,
144
+ "learning_rate": 2.5329815303430082e-05,
145
+ "loss": 0.4995,
146
+ "step": 230
147
+ },
148
+ {
149
+ "epoch": 0.57,
150
+ "learning_rate": 2.4010554089709765e-05,
151
+ "loss": 0.4744,
152
+ "step": 240
153
+ },
154
+ {
155
+ "epoch": 0.59,
156
+ "learning_rate": 2.269129287598945e-05,
157
+ "loss": 0.4543,
158
+ "step": 250
159
+ },
160
+ {
161
+ "epoch": 0.62,
162
+ "learning_rate": 2.1372031662269128e-05,
163
+ "loss": 0.4613,
164
+ "step": 260
165
+ },
166
+ {
167
+ "epoch": 0.64,
168
+ "learning_rate": 2.0052770448548815e-05,
169
+ "loss": 0.475,
170
+ "step": 270
171
+ },
172
+ {
173
+ "epoch": 0.66,
174
+ "learning_rate": 1.8733509234828498e-05,
175
+ "loss": 0.4324,
176
+ "step": 280
177
+ },
178
+ {
179
+ "epoch": 0.69,
180
+ "learning_rate": 1.741424802110818e-05,
181
+ "loss": 0.4003,
182
+ "step": 290
183
+ },
184
+ {
185
+ "epoch": 0.71,
186
+ "learning_rate": 1.6094986807387864e-05,
187
+ "loss": 0.4409,
188
+ "step": 300
189
+ },
190
+ {
191
+ "epoch": 0.73,
192
+ "learning_rate": 1.4775725593667547e-05,
193
+ "loss": 0.492,
194
+ "step": 310
195
+ },
196
+ {
197
+ "epoch": 0.76,
198
+ "learning_rate": 1.345646437994723e-05,
199
+ "loss": 0.4541,
200
+ "step": 320
201
+ },
202
+ {
203
+ "epoch": 0.78,
204
+ "learning_rate": 1.2137203166226914e-05,
205
+ "loss": 0.4202,
206
+ "step": 330
207
+ },
208
+ {
209
+ "epoch": 0.81,
210
+ "learning_rate": 1.0817941952506597e-05,
211
+ "loss": 0.4371,
212
+ "step": 340
213
+ },
214
+ {
215
+ "epoch": 0.83,
216
+ "learning_rate": 9.49868073878628e-06,
217
+ "loss": 0.4339,
218
+ "step": 350
219
+ },
220
+ {
221
+ "epoch": 0.85,
222
+ "learning_rate": 8.179419525065963e-06,
223
+ "loss": 0.4083,
224
+ "step": 360
225
+ },
226
+ {
227
+ "epoch": 0.88,
228
+ "learning_rate": 6.860158311345646e-06,
229
+ "loss": 0.4668,
230
+ "step": 370
231
+ },
232
+ {
233
+ "epoch": 0.9,
234
+ "learning_rate": 5.540897097625329e-06,
235
+ "loss": 0.4238,
236
+ "step": 380
237
+ },
238
+ {
239
+ "epoch": 0.92,
240
+ "learning_rate": 4.221635883905013e-06,
241
+ "loss": 0.434,
242
+ "step": 390
243
+ },
244
+ {
245
+ "epoch": 0.95,
246
+ "learning_rate": 2.9023746701846966e-06,
247
+ "loss": 0.4309,
248
+ "step": 400
249
+ },
250
+ {
251
+ "epoch": 0.97,
252
+ "learning_rate": 1.5831134564643801e-06,
253
+ "loss": 0.4218,
254
+ "step": 410
255
+ },
256
+ {
257
+ "epoch": 1.0,
258
+ "learning_rate": 2.6385224274406334e-07,
259
+ "loss": 0.3743,
260
+ "step": 420
261
+ },
262
+ {
263
+ "epoch": 1.0,
264
+ "eval_accuracy": 0.9833333333333333,
265
+ "eval_loss": 0.05558411777019501,
266
+ "eval_runtime": 38.6009,
267
+ "eval_samples_per_second": 155.437,
268
+ "eval_steps_per_second": 4.87,
269
+ "step": 422
270
+ },
271
+ {
272
+ "epoch": 1.0,
273
+ "step": 422,
274
+ "total_flos": 1.342523444871168e+18,
275
+ "train_loss": 0.6594652506694975,
276
+ "train_runtime": 822.8009,
277
+ "train_samples_per_second": 65.629,
278
+ "train_steps_per_second": 0.513
279
+ }
280
+ ],
281
+ "max_steps": 422,
282
+ "num_train_epochs": 1,
283
+ "total_flos": 1.342523444871168e+18,
284
+ "trial_name": null,
285
+ "trial_params": null
286
+ }
training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:25b3008f2df2db06844e1c7300c08af1eec38c6580f96246ac4dc0758c823eb2
3
+ size 3311