friedrice231
commited on
Commit
•
bb4a758
1
Parent(s):
d44c0f3
Training in progress, epoch 1
Browse files- README.md +80 -0
- all_results.json +13 -0
- config.json +61 -0
- eval_results.json +8 -0
- model.safetensors +3 -0
- preprocessor_config.json +22 -0
- runs/Feb14_14-22-58_staff/events.out.tfevents.1707891894.staff.1131584.0 +3 -0
- runs/Feb14_14-22-58_staff/events.out.tfevents.1707896585.staff.1131584.1 +3 -0
- runs/Feb14_14-22-58_staff/events.out.tfevents.1707901870.staff.1131584.2 +3 -0
- runs/Feb15_10-05-12_staff/events.out.tfevents.1707963212.staff.1390720.0 +3 -0
- runs/Feb16_10-49-55_staff/events.out.tfevents.1708053147.staff.2184386.0 +3 -0
- train_results.json +8 -0
- trainer_state.json +147 -0
- training_args.bin +3 -0
README.md
ADDED
@@ -0,0 +1,80 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: apache-2.0
|
3 |
+
base_model: microsoft/swin-tiny-patch4-window7-224
|
4 |
+
tags:
|
5 |
+
- generated_from_trainer
|
6 |
+
datasets:
|
7 |
+
- imagefolder
|
8 |
+
metrics:
|
9 |
+
- accuracy
|
10 |
+
model-index:
|
11 |
+
- name: swin-tiny-patch4-window7-224-finetuned-eurosat
|
12 |
+
results:
|
13 |
+
- task:
|
14 |
+
name: Image Classification
|
15 |
+
type: image-classification
|
16 |
+
dataset:
|
17 |
+
name: imagefolder
|
18 |
+
type: imagefolder
|
19 |
+
config: default
|
20 |
+
split: validation
|
21 |
+
args: default
|
22 |
+
metrics:
|
23 |
+
- name: Accuracy
|
24 |
+
type: accuracy
|
25 |
+
value: 0.9476209516193522
|
26 |
+
---
|
27 |
+
|
28 |
+
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
29 |
+
should probably proofread and complete it, then remove this comment. -->
|
30 |
+
|
31 |
+
# swin-tiny-patch4-window7-224-finetuned-eurosat
|
32 |
+
|
33 |
+
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 imagefolder dataset.
|
34 |
+
It achieves the following results on the evaluation set:
|
35 |
+
- Loss: 0.1349
|
36 |
+
- Accuracy: 0.9476
|
37 |
+
|
38 |
+
## Model description
|
39 |
+
|
40 |
+
More information needed
|
41 |
+
|
42 |
+
## Intended uses & limitations
|
43 |
+
|
44 |
+
More information needed
|
45 |
+
|
46 |
+
## Training and evaluation data
|
47 |
+
|
48 |
+
More information needed
|
49 |
+
|
50 |
+
## Training procedure
|
51 |
+
|
52 |
+
### Training hyperparameters
|
53 |
+
|
54 |
+
The following hyperparameters were used during training:
|
55 |
+
- learning_rate: 5e-05
|
56 |
+
- train_batch_size: 64
|
57 |
+
- eval_batch_size: 64
|
58 |
+
- seed: 42
|
59 |
+
- gradient_accumulation_steps: 4
|
60 |
+
- total_train_batch_size: 256
|
61 |
+
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
|
62 |
+
- lr_scheduler_type: linear
|
63 |
+
- lr_scheduler_warmup_ratio: 0.1
|
64 |
+
- num_epochs: 3
|
65 |
+
|
66 |
+
### Training results
|
67 |
+
|
68 |
+
| Training Loss | Epoch | Step | Validation Loss | Accuracy |
|
69 |
+
|:-------------:|:-----:|:----:|:---------------:|:--------:|
|
70 |
+
| 0.2131 | 1.0 | 51 | 0.1843 | 0.9320 |
|
71 |
+
| 0.1521 | 2.0 | 102 | 0.1215 | 0.9552 |
|
72 |
+
| 0.1318 | 3.0 | 153 | 0.1349 | 0.9476 |
|
73 |
+
|
74 |
+
|
75 |
+
### Framework versions
|
76 |
+
|
77 |
+
- Transformers 4.37.2
|
78 |
+
- Pytorch 1.13.1
|
79 |
+
- Datasets 2.16.1
|
80 |
+
- Tokenizers 0.15.1
|
all_results.json
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"epoch": 3.0,
|
3 |
+
"eval_accuracy": 0.9586165533786486,
|
4 |
+
"eval_loss": 0.10476645827293396,
|
5 |
+
"eval_runtime": 455.4725,
|
6 |
+
"eval_samples_per_second": 10.982,
|
7 |
+
"eval_steps_per_second": 0.173,
|
8 |
+
"total_flos": 9.695327063822991e+17,
|
9 |
+
"train_loss": 0.22365938545831668,
|
10 |
+
"train_runtime": 8570.2671,
|
11 |
+
"train_samples_per_second": 4.551,
|
12 |
+
"train_steps_per_second": 0.018
|
13 |
+
}
|
config.json
ADDED
@@ -0,0 +1,61 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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": "meme",
|
21 |
+
"1": "not_meme"
|
22 |
+
},
|
23 |
+
"image_size": 224,
|
24 |
+
"initializer_range": 0.02,
|
25 |
+
"label2id": {
|
26 |
+
"meme": 0,
|
27 |
+
"not_meme": 1
|
28 |
+
},
|
29 |
+
"layer_norm_eps": 1e-05,
|
30 |
+
"mlp_ratio": 4.0,
|
31 |
+
"model_type": "swin",
|
32 |
+
"num_channels": 3,
|
33 |
+
"num_heads": [
|
34 |
+
3,
|
35 |
+
6,
|
36 |
+
12,
|
37 |
+
24
|
38 |
+
],
|
39 |
+
"num_layers": 4,
|
40 |
+
"out_features": [
|
41 |
+
"stage4"
|
42 |
+
],
|
43 |
+
"out_indices": [
|
44 |
+
4
|
45 |
+
],
|
46 |
+
"patch_size": 4,
|
47 |
+
"path_norm": true,
|
48 |
+
"problem_type": "single_label_classification",
|
49 |
+
"qkv_bias": true,
|
50 |
+
"stage_names": [
|
51 |
+
"stem",
|
52 |
+
"stage1",
|
53 |
+
"stage2",
|
54 |
+
"stage3",
|
55 |
+
"stage4"
|
56 |
+
],
|
57 |
+
"torch_dtype": "float32",
|
58 |
+
"transformers_version": "4.37.2",
|
59 |
+
"use_absolute_embeddings": false,
|
60 |
+
"window_size": 7
|
61 |
+
}
|
eval_results.json
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"epoch": 3.0,
|
3 |
+
"eval_accuracy": 0.9586165533786486,
|
4 |
+
"eval_loss": 0.10476645827293396,
|
5 |
+
"eval_runtime": 455.4725,
|
6 |
+
"eval_samples_per_second": 10.982,
|
7 |
+
"eval_steps_per_second": 0.173
|
8 |
+
}
|
model.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:cbc05b2f599c5c725aa494e5272e54fdde49324297645cc9c4b7dcb185f5b5b2
|
3 |
+
size 110342832
|
preprocessor_config.json
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"do_normalize": true,
|
3 |
+
"do_rescale": true,
|
4 |
+
"do_resize": true,
|
5 |
+
"image_mean": [
|
6 |
+
0.485,
|
7 |
+
0.456,
|
8 |
+
0.406
|
9 |
+
],
|
10 |
+
"image_processor_type": "ViTImageProcessor",
|
11 |
+
"image_std": [
|
12 |
+
0.229,
|
13 |
+
0.224,
|
14 |
+
0.225
|
15 |
+
],
|
16 |
+
"resample": 3,
|
17 |
+
"rescale_factor": 0.00392156862745098,
|
18 |
+
"size": {
|
19 |
+
"height": 224,
|
20 |
+
"width": 224
|
21 |
+
}
|
22 |
+
}
|
runs/Feb14_14-22-58_staff/events.out.tfevents.1707891894.staff.1131584.0
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:a34d57a346535558f8610e18dc646cb28c22db4207e1f778af53f22d3f160b58
|
3 |
+
size 8453
|
runs/Feb14_14-22-58_staff/events.out.tfevents.1707896585.staff.1131584.1
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:06661ae147001450ffc627e0459290c1fe8614dfc0ba82de1bf6cde992c4034d
|
3 |
+
size 8502
|
runs/Feb14_14-22-58_staff/events.out.tfevents.1707901870.staff.1131584.2
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:7f22cb5962ba8df93289cac38f8863278722c8796dc68cd2491e3ce7f4ef67d0
|
3 |
+
size 411
|
runs/Feb15_10-05-12_staff/events.out.tfevents.1707963212.staff.1390720.0
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:29b09a04a22ee662da98e3f9e4d035e97ed33ffbf762ac11999293c212e69481
|
3 |
+
size 8453
|
runs/Feb16_10-49-55_staff/events.out.tfevents.1708053147.staff.2184386.0
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:48416fdf9aca2273b96a4d2e909966f84347fb8ac2f9d82d0caf20bbea1dc35d
|
3 |
+
size 5911
|
train_results.json
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"epoch": 3.0,
|
3 |
+
"total_flos": 9.695327063822991e+17,
|
4 |
+
"train_loss": 0.22365938545831668,
|
5 |
+
"train_runtime": 8570.2671,
|
6 |
+
"train_samples_per_second": 4.551,
|
7 |
+
"train_steps_per_second": 0.018
|
8 |
+
}
|
trainer_state.json
ADDED
@@ -0,0 +1,147 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"best_metric": 0.955217912834866,
|
3 |
+
"best_model_checkpoint": "swin-tiny-patch4-window7-224-finetuned-eurosat/checkpoint-102",
|
4 |
+
"epoch": 3.0,
|
5 |
+
"eval_steps": 500,
|
6 |
+
"global_step": 153,
|
7 |
+
"is_hyper_param_search": false,
|
8 |
+
"is_local_process_zero": true,
|
9 |
+
"is_world_process_zero": true,
|
10 |
+
"log_history": [
|
11 |
+
{
|
12 |
+
"epoch": 0.2,
|
13 |
+
"learning_rate": 3.125e-05,
|
14 |
+
"loss": 0.6793,
|
15 |
+
"step": 10
|
16 |
+
},
|
17 |
+
{
|
18 |
+
"epoch": 0.39,
|
19 |
+
"learning_rate": 4.854014598540147e-05,
|
20 |
+
"loss": 0.4785,
|
21 |
+
"step": 20
|
22 |
+
},
|
23 |
+
{
|
24 |
+
"epoch": 0.59,
|
25 |
+
"learning_rate": 4.489051094890511e-05,
|
26 |
+
"loss": 0.2911,
|
27 |
+
"step": 30
|
28 |
+
},
|
29 |
+
{
|
30 |
+
"epoch": 0.78,
|
31 |
+
"learning_rate": 4.124087591240876e-05,
|
32 |
+
"loss": 0.2317,
|
33 |
+
"step": 40
|
34 |
+
},
|
35 |
+
{
|
36 |
+
"epoch": 0.98,
|
37 |
+
"learning_rate": 3.759124087591241e-05,
|
38 |
+
"loss": 0.2131,
|
39 |
+
"step": 50
|
40 |
+
},
|
41 |
+
{
|
42 |
+
"epoch": 1.0,
|
43 |
+
"eval_accuracy": 0.9320271891243502,
|
44 |
+
"eval_loss": 0.18428057432174683,
|
45 |
+
"eval_runtime": 169.576,
|
46 |
+
"eval_samples_per_second": 29.497,
|
47 |
+
"eval_steps_per_second": 0.466,
|
48 |
+
"step": 51
|
49 |
+
},
|
50 |
+
{
|
51 |
+
"epoch": 1.18,
|
52 |
+
"learning_rate": 3.3941605839416055e-05,
|
53 |
+
"loss": 0.1782,
|
54 |
+
"step": 60
|
55 |
+
},
|
56 |
+
{
|
57 |
+
"epoch": 1.37,
|
58 |
+
"learning_rate": 3.029197080291971e-05,
|
59 |
+
"loss": 0.1681,
|
60 |
+
"step": 70
|
61 |
+
},
|
62 |
+
{
|
63 |
+
"epoch": 1.57,
|
64 |
+
"learning_rate": 2.664233576642336e-05,
|
65 |
+
"loss": 0.1598,
|
66 |
+
"step": 80
|
67 |
+
},
|
68 |
+
{
|
69 |
+
"epoch": 1.76,
|
70 |
+
"learning_rate": 2.2992700729927008e-05,
|
71 |
+
"loss": 0.1517,
|
72 |
+
"step": 90
|
73 |
+
},
|
74 |
+
{
|
75 |
+
"epoch": 1.96,
|
76 |
+
"learning_rate": 1.934306569343066e-05,
|
77 |
+
"loss": 0.1521,
|
78 |
+
"step": 100
|
79 |
+
},
|
80 |
+
{
|
81 |
+
"epoch": 2.0,
|
82 |
+
"eval_accuracy": 0.955217912834866,
|
83 |
+
"eval_loss": 0.12148739397525787,
|
84 |
+
"eval_runtime": 189.5006,
|
85 |
+
"eval_samples_per_second": 26.396,
|
86 |
+
"eval_steps_per_second": 0.417,
|
87 |
+
"step": 102
|
88 |
+
},
|
89 |
+
{
|
90 |
+
"epoch": 2.16,
|
91 |
+
"learning_rate": 1.569343065693431e-05,
|
92 |
+
"loss": 0.1512,
|
93 |
+
"step": 110
|
94 |
+
},
|
95 |
+
{
|
96 |
+
"epoch": 2.35,
|
97 |
+
"learning_rate": 1.2043795620437957e-05,
|
98 |
+
"loss": 0.1324,
|
99 |
+
"step": 120
|
100 |
+
},
|
101 |
+
{
|
102 |
+
"epoch": 2.55,
|
103 |
+
"learning_rate": 8.394160583941606e-06,
|
104 |
+
"loss": 0.134,
|
105 |
+
"step": 130
|
106 |
+
},
|
107 |
+
{
|
108 |
+
"epoch": 2.75,
|
109 |
+
"learning_rate": 4.744525547445255e-06,
|
110 |
+
"loss": 0.1269,
|
111 |
+
"step": 140
|
112 |
+
},
|
113 |
+
{
|
114 |
+
"epoch": 2.94,
|
115 |
+
"learning_rate": 1.0948905109489052e-06,
|
116 |
+
"loss": 0.1318,
|
117 |
+
"step": 150
|
118 |
+
},
|
119 |
+
{
|
120 |
+
"epoch": 3.0,
|
121 |
+
"eval_accuracy": 0.9476209516193522,
|
122 |
+
"eval_loss": 0.1348794549703598,
|
123 |
+
"eval_runtime": 1015.3639,
|
124 |
+
"eval_samples_per_second": 4.926,
|
125 |
+
"eval_steps_per_second": 0.078,
|
126 |
+
"step": 153
|
127 |
+
},
|
128 |
+
{
|
129 |
+
"epoch": 3.0,
|
130 |
+
"step": 153,
|
131 |
+
"total_flos": 9.695327063822991e+17,
|
132 |
+
"train_loss": 0.22365938545831668,
|
133 |
+
"train_runtime": 8570.2671,
|
134 |
+
"train_samples_per_second": 4.551,
|
135 |
+
"train_steps_per_second": 0.018
|
136 |
+
}
|
137 |
+
],
|
138 |
+
"logging_steps": 10,
|
139 |
+
"max_steps": 153,
|
140 |
+
"num_input_tokens_seen": 0,
|
141 |
+
"num_train_epochs": 3,
|
142 |
+
"save_steps": 500,
|
143 |
+
"total_flos": 9.695327063822991e+17,
|
144 |
+
"train_batch_size": 64,
|
145 |
+
"trial_name": null,
|
146 |
+
"trial_params": null
|
147 |
+
}
|
training_args.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:b6d9e00e79ae54e7f1c4bccde9dc166bbd43ef823931d42a971d558e1137d9f4
|
3 |
+
size 4347
|