ayoubkirouane
commited on
Commit
•
a773c0b
1
Parent(s):
24882f2
End of training
Browse files- README.md +76 -0
- all_results.json +13 -0
- config.json +34 -0
- eval_results.json +8 -0
- preprocessor_config.json +22 -0
- pytorch_model.bin +3 -0
- train_results.json +8 -0
- trainer_state.json +202 -0
- training_args.bin +3 -0
README.md
ADDED
@@ -0,0 +1,76 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: apache-2.0
|
3 |
+
base_model: google/vit-base-patch16-224-in21k
|
4 |
+
tags:
|
5 |
+
- generated_from_trainer
|
6 |
+
datasets:
|
7 |
+
- beans
|
8 |
+
metrics:
|
9 |
+
- accuracy
|
10 |
+
model-index:
|
11 |
+
- name: vit-base-beans-demo-v5
|
12 |
+
results:
|
13 |
+
- task:
|
14 |
+
name: Image Classification
|
15 |
+
type: image-classification
|
16 |
+
dataset:
|
17 |
+
name: beans
|
18 |
+
type: beans
|
19 |
+
config: default
|
20 |
+
split: validation
|
21 |
+
args: default
|
22 |
+
metrics:
|
23 |
+
- name: Accuracy
|
24 |
+
type: accuracy
|
25 |
+
value: 1.0
|
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 |
+
# vit-base-beans-demo-v5
|
32 |
+
|
33 |
+
This model is a fine-tuned version of [google/vit-base-patch16-224-in21k](https://huggingface.co/google/vit-base-patch16-224-in21k) on the beans dataset.
|
34 |
+
It achieves the following results on the evaluation set:
|
35 |
+
- Loss: 0.0155
|
36 |
+
- Accuracy: 1.0
|
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: 0.0002
|
56 |
+
- train_batch_size: 16
|
57 |
+
- eval_batch_size: 8
|
58 |
+
- seed: 42
|
59 |
+
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
|
60 |
+
- lr_scheduler_type: linear
|
61 |
+
- num_epochs: 4
|
62 |
+
|
63 |
+
### Training results
|
64 |
+
|
65 |
+
| Training Loss | Epoch | Step | Validation Loss | Accuracy |
|
66 |
+
|:-------------:|:-----:|:----:|:---------------:|:--------:|
|
67 |
+
| 0.1495 | 1.54 | 100 | 0.0910 | 0.9774 |
|
68 |
+
| 0.0121 | 3.08 | 200 | 0.0155 | 1.0 |
|
69 |
+
|
70 |
+
|
71 |
+
### Framework versions
|
72 |
+
|
73 |
+
- Transformers 4.33.2
|
74 |
+
- Pytorch 2.0.1+cu118
|
75 |
+
- Datasets 2.14.5
|
76 |
+
- Tokenizers 0.13.3
|
all_results.json
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"epoch": 4.0,
|
3 |
+
"eval_accuracy": 1.0,
|
4 |
+
"eval_loss": 0.015506945550441742,
|
5 |
+
"eval_runtime": 2.3353,
|
6 |
+
"eval_samples_per_second": 56.952,
|
7 |
+
"eval_steps_per_second": 7.28,
|
8 |
+
"total_flos": 3.205097416476426e+17,
|
9 |
+
"train_loss": 0.12198760618384068,
|
10 |
+
"train_runtime": 144.9863,
|
11 |
+
"train_samples_per_second": 28.527,
|
12 |
+
"train_steps_per_second": 1.793
|
13 |
+
}
|
config.json
ADDED
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_name_or_path": "google/vit-base-patch16-224-in21k",
|
3 |
+
"architectures": [
|
4 |
+
"ViTForImageClassification"
|
5 |
+
],
|
6 |
+
"attention_probs_dropout_prob": 0.0,
|
7 |
+
"encoder_stride": 16,
|
8 |
+
"hidden_act": "gelu",
|
9 |
+
"hidden_dropout_prob": 0.0,
|
10 |
+
"hidden_size": 768,
|
11 |
+
"id2label": {
|
12 |
+
"0": "angular_leaf_spot",
|
13 |
+
"1": "bean_rust",
|
14 |
+
"2": "healthy"
|
15 |
+
},
|
16 |
+
"image_size": 224,
|
17 |
+
"initializer_range": 0.02,
|
18 |
+
"intermediate_size": 3072,
|
19 |
+
"label2id": {
|
20 |
+
"angular_leaf_spot": "0",
|
21 |
+
"bean_rust": "1",
|
22 |
+
"healthy": "2"
|
23 |
+
},
|
24 |
+
"layer_norm_eps": 1e-12,
|
25 |
+
"model_type": "vit",
|
26 |
+
"num_attention_heads": 12,
|
27 |
+
"num_channels": 3,
|
28 |
+
"num_hidden_layers": 12,
|
29 |
+
"patch_size": 16,
|
30 |
+
"problem_type": "single_label_classification",
|
31 |
+
"qkv_bias": true,
|
32 |
+
"torch_dtype": "float32",
|
33 |
+
"transformers_version": "4.33.2"
|
34 |
+
}
|
eval_results.json
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"epoch": 4.0,
|
3 |
+
"eval_accuracy": 1.0,
|
4 |
+
"eval_loss": 0.015506945550441742,
|
5 |
+
"eval_runtime": 2.3353,
|
6 |
+
"eval_samples_per_second": 56.952,
|
7 |
+
"eval_steps_per_second": 7.28
|
8 |
+
}
|
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.5,
|
7 |
+
0.5,
|
8 |
+
0.5
|
9 |
+
],
|
10 |
+
"image_processor_type": "ViTFeatureExtractor",
|
11 |
+
"image_std": [
|
12 |
+
0.5,
|
13 |
+
0.5,
|
14 |
+
0.5
|
15 |
+
],
|
16 |
+
"resample": 2,
|
17 |
+
"rescale_factor": 0.00392156862745098,
|
18 |
+
"size": {
|
19 |
+
"height": 224,
|
20 |
+
"width": 224
|
21 |
+
}
|
22 |
+
}
|
pytorch_model.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:4967aa7e0f96d3cb53af7b4843cd22db259c5e06b67dcf932305d49400743055
|
3 |
+
size 343271789
|
train_results.json
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"epoch": 4.0,
|
3 |
+
"total_flos": 3.205097416476426e+17,
|
4 |
+
"train_loss": 0.12198760618384068,
|
5 |
+
"train_runtime": 144.9863,
|
6 |
+
"train_samples_per_second": 28.527,
|
7 |
+
"train_steps_per_second": 1.793
|
8 |
+
}
|
trainer_state.json
ADDED
@@ -0,0 +1,202 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"best_metric": 0.015506945550441742,
|
3 |
+
"best_model_checkpoint": "./vit-base-beans-demo-v5/checkpoint-200",
|
4 |
+
"epoch": 4.0,
|
5 |
+
"eval_steps": 100,
|
6 |
+
"global_step": 260,
|
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.15,
|
13 |
+
"learning_rate": 0.00019230769230769233,
|
14 |
+
"loss": 0.8061,
|
15 |
+
"step": 10
|
16 |
+
},
|
17 |
+
{
|
18 |
+
"epoch": 0.31,
|
19 |
+
"learning_rate": 0.00018461538461538463,
|
20 |
+
"loss": 0.3285,
|
21 |
+
"step": 20
|
22 |
+
},
|
23 |
+
{
|
24 |
+
"epoch": 0.46,
|
25 |
+
"learning_rate": 0.00017692307692307693,
|
26 |
+
"loss": 0.3202,
|
27 |
+
"step": 30
|
28 |
+
},
|
29 |
+
{
|
30 |
+
"epoch": 0.62,
|
31 |
+
"learning_rate": 0.00016923076923076923,
|
32 |
+
"loss": 0.1924,
|
33 |
+
"step": 40
|
34 |
+
},
|
35 |
+
{
|
36 |
+
"epoch": 0.77,
|
37 |
+
"learning_rate": 0.00016153846153846155,
|
38 |
+
"loss": 0.3125,
|
39 |
+
"step": 50
|
40 |
+
},
|
41 |
+
{
|
42 |
+
"epoch": 0.92,
|
43 |
+
"learning_rate": 0.00015384615384615385,
|
44 |
+
"loss": 0.2745,
|
45 |
+
"step": 60
|
46 |
+
},
|
47 |
+
{
|
48 |
+
"epoch": 1.08,
|
49 |
+
"learning_rate": 0.00014615384615384615,
|
50 |
+
"loss": 0.1564,
|
51 |
+
"step": 70
|
52 |
+
},
|
53 |
+
{
|
54 |
+
"epoch": 1.23,
|
55 |
+
"learning_rate": 0.00013846153846153847,
|
56 |
+
"loss": 0.1195,
|
57 |
+
"step": 80
|
58 |
+
},
|
59 |
+
{
|
60 |
+
"epoch": 1.38,
|
61 |
+
"learning_rate": 0.00013076923076923077,
|
62 |
+
"loss": 0.0561,
|
63 |
+
"step": 90
|
64 |
+
},
|
65 |
+
{
|
66 |
+
"epoch": 1.54,
|
67 |
+
"learning_rate": 0.0001230769230769231,
|
68 |
+
"loss": 0.1495,
|
69 |
+
"step": 100
|
70 |
+
},
|
71 |
+
{
|
72 |
+
"epoch": 1.54,
|
73 |
+
"eval_accuracy": 0.9774436090225563,
|
74 |
+
"eval_loss": 0.09097668528556824,
|
75 |
+
"eval_runtime": 2.3095,
|
76 |
+
"eval_samples_per_second": 57.589,
|
77 |
+
"eval_steps_per_second": 7.361,
|
78 |
+
"step": 100
|
79 |
+
},
|
80 |
+
{
|
81 |
+
"epoch": 1.69,
|
82 |
+
"learning_rate": 0.00011538461538461538,
|
83 |
+
"loss": 0.1,
|
84 |
+
"step": 110
|
85 |
+
},
|
86 |
+
{
|
87 |
+
"epoch": 1.85,
|
88 |
+
"learning_rate": 0.0001076923076923077,
|
89 |
+
"loss": 0.0584,
|
90 |
+
"step": 120
|
91 |
+
},
|
92 |
+
{
|
93 |
+
"epoch": 2.0,
|
94 |
+
"learning_rate": 0.0001,
|
95 |
+
"loss": 0.0593,
|
96 |
+
"step": 130
|
97 |
+
},
|
98 |
+
{
|
99 |
+
"epoch": 2.15,
|
100 |
+
"learning_rate": 9.230769230769232e-05,
|
101 |
+
"loss": 0.0584,
|
102 |
+
"step": 140
|
103 |
+
},
|
104 |
+
{
|
105 |
+
"epoch": 2.31,
|
106 |
+
"learning_rate": 8.461538461538461e-05,
|
107 |
+
"loss": 0.0367,
|
108 |
+
"step": 150
|
109 |
+
},
|
110 |
+
{
|
111 |
+
"epoch": 2.46,
|
112 |
+
"learning_rate": 7.692307692307693e-05,
|
113 |
+
"loss": 0.0196,
|
114 |
+
"step": 160
|
115 |
+
},
|
116 |
+
{
|
117 |
+
"epoch": 2.62,
|
118 |
+
"learning_rate": 6.923076923076924e-05,
|
119 |
+
"loss": 0.0168,
|
120 |
+
"step": 170
|
121 |
+
},
|
122 |
+
{
|
123 |
+
"epoch": 2.77,
|
124 |
+
"learning_rate": 6.153846153846155e-05,
|
125 |
+
"loss": 0.0142,
|
126 |
+
"step": 180
|
127 |
+
},
|
128 |
+
{
|
129 |
+
"epoch": 2.92,
|
130 |
+
"learning_rate": 5.384615384615385e-05,
|
131 |
+
"loss": 0.0141,
|
132 |
+
"step": 190
|
133 |
+
},
|
134 |
+
{
|
135 |
+
"epoch": 3.08,
|
136 |
+
"learning_rate": 4.615384615384616e-05,
|
137 |
+
"loss": 0.0121,
|
138 |
+
"step": 200
|
139 |
+
},
|
140 |
+
{
|
141 |
+
"epoch": 3.08,
|
142 |
+
"eval_accuracy": 1.0,
|
143 |
+
"eval_loss": 0.015506945550441742,
|
144 |
+
"eval_runtime": 1.9341,
|
145 |
+
"eval_samples_per_second": 68.767,
|
146 |
+
"eval_steps_per_second": 8.79,
|
147 |
+
"step": 200
|
148 |
+
},
|
149 |
+
{
|
150 |
+
"epoch": 3.23,
|
151 |
+
"learning_rate": 3.846153846153846e-05,
|
152 |
+
"loss": 0.012,
|
153 |
+
"step": 210
|
154 |
+
},
|
155 |
+
{
|
156 |
+
"epoch": 3.38,
|
157 |
+
"learning_rate": 3.0769230769230774e-05,
|
158 |
+
"loss": 0.0116,
|
159 |
+
"step": 220
|
160 |
+
},
|
161 |
+
{
|
162 |
+
"epoch": 3.54,
|
163 |
+
"learning_rate": 2.307692307692308e-05,
|
164 |
+
"loss": 0.0108,
|
165 |
+
"step": 230
|
166 |
+
},
|
167 |
+
{
|
168 |
+
"epoch": 3.69,
|
169 |
+
"learning_rate": 1.5384615384615387e-05,
|
170 |
+
"loss": 0.0108,
|
171 |
+
"step": 240
|
172 |
+
},
|
173 |
+
{
|
174 |
+
"epoch": 3.85,
|
175 |
+
"learning_rate": 7.692307692307694e-06,
|
176 |
+
"loss": 0.0108,
|
177 |
+
"step": 250
|
178 |
+
},
|
179 |
+
{
|
180 |
+
"epoch": 4.0,
|
181 |
+
"learning_rate": 0.0,
|
182 |
+
"loss": 0.0107,
|
183 |
+
"step": 260
|
184 |
+
},
|
185 |
+
{
|
186 |
+
"epoch": 4.0,
|
187 |
+
"step": 260,
|
188 |
+
"total_flos": 3.205097416476426e+17,
|
189 |
+
"train_loss": 0.12198760618384068,
|
190 |
+
"train_runtime": 144.9863,
|
191 |
+
"train_samples_per_second": 28.527,
|
192 |
+
"train_steps_per_second": 1.793
|
193 |
+
}
|
194 |
+
],
|
195 |
+
"logging_steps": 10,
|
196 |
+
"max_steps": 260,
|
197 |
+
"num_train_epochs": 4,
|
198 |
+
"save_steps": 100,
|
199 |
+
"total_flos": 3.205097416476426e+17,
|
200 |
+
"trial_name": null,
|
201 |
+
"trial_params": null
|
202 |
+
}
|
training_args.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:0ca55f7de4f67f68068e54cfc40f8d9d9017cd73c2843a58462c60fbb765bfbf
|
3 |
+
size 4027
|