End of training
Browse files- README.md +76 -0
- all_results.json +8 -0
- config.json +34 -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-patch16-224-in21k-finetuned-beans
|
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: 0.9849624060150376
|
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-patch16-224-in21k-finetuned-beans
|
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.0622
|
36 |
+
- Accuracy: 0.9850
|
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.1329 | 1.54 | 100 | 0.0408 | 0.9925 |
|
68 |
+
| 0.0169 | 3.08 | 200 | 0.0622 | 0.9850 |
|
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,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"epoch": 4.0,
|
3 |
+
"total_flos": 3.205097416476426e+17,
|
4 |
+
"train_loss": 0.11557345737058383,
|
5 |
+
"train_runtime": 138.3777,
|
6 |
+
"train_samples_per_second": 29.889,
|
7 |
+
"train_steps_per_second": 1.879
|
8 |
+
}
|
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 |
+
}
|
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": "ViTImageProcessor",
|
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:b556adbd877d5fbb2f8e4228630a49e6010ec18cc1c59d4002ca28523bb2dbb7
|
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.11557345737058383,
|
5 |
+
"train_runtime": 138.3777,
|
6 |
+
"train_samples_per_second": 29.889,
|
7 |
+
"train_steps_per_second": 1.879
|
8 |
+
}
|
trainer_state.json
ADDED
@@ -0,0 +1,202 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"best_metric": 0.040785256773233414,
|
3 |
+
"best_model_checkpoint": "./vit-base-beans/checkpoint-100",
|
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.8157,
|
15 |
+
"step": 10
|
16 |
+
},
|
17 |
+
{
|
18 |
+
"epoch": 0.31,
|
19 |
+
"learning_rate": 0.00018461538461538463,
|
20 |
+
"loss": 0.2831,
|
21 |
+
"step": 20
|
22 |
+
},
|
23 |
+
{
|
24 |
+
"epoch": 0.46,
|
25 |
+
"learning_rate": 0.00017692307692307693,
|
26 |
+
"loss": 0.3068,
|
27 |
+
"step": 30
|
28 |
+
},
|
29 |
+
{
|
30 |
+
"epoch": 0.62,
|
31 |
+
"learning_rate": 0.00016923076923076923,
|
32 |
+
"loss": 0.1716,
|
33 |
+
"step": 40
|
34 |
+
},
|
35 |
+
{
|
36 |
+
"epoch": 0.77,
|
37 |
+
"learning_rate": 0.00016153846153846155,
|
38 |
+
"loss": 0.1635,
|
39 |
+
"step": 50
|
40 |
+
},
|
41 |
+
{
|
42 |
+
"epoch": 0.92,
|
43 |
+
"learning_rate": 0.00015384615384615385,
|
44 |
+
"loss": 0.2457,
|
45 |
+
"step": 60
|
46 |
+
},
|
47 |
+
{
|
48 |
+
"epoch": 1.08,
|
49 |
+
"learning_rate": 0.00014615384615384615,
|
50 |
+
"loss": 0.1132,
|
51 |
+
"step": 70
|
52 |
+
},
|
53 |
+
{
|
54 |
+
"epoch": 1.23,
|
55 |
+
"learning_rate": 0.00013846153846153847,
|
56 |
+
"loss": 0.1054,
|
57 |
+
"step": 80
|
58 |
+
},
|
59 |
+
{
|
60 |
+
"epoch": 1.38,
|
61 |
+
"learning_rate": 0.00013076923076923077,
|
62 |
+
"loss": 0.0803,
|
63 |
+
"step": 90
|
64 |
+
},
|
65 |
+
{
|
66 |
+
"epoch": 1.54,
|
67 |
+
"learning_rate": 0.0001230769230769231,
|
68 |
+
"loss": 0.1329,
|
69 |
+
"step": 100
|
70 |
+
},
|
71 |
+
{
|
72 |
+
"epoch": 1.54,
|
73 |
+
"eval_accuracy": 0.9924812030075187,
|
74 |
+
"eval_loss": 0.040785256773233414,
|
75 |
+
"eval_runtime": 2.0027,
|
76 |
+
"eval_samples_per_second": 66.41,
|
77 |
+
"eval_steps_per_second": 8.489,
|
78 |
+
"step": 100
|
79 |
+
},
|
80 |
+
{
|
81 |
+
"epoch": 1.69,
|
82 |
+
"learning_rate": 0.00011538461538461538,
|
83 |
+
"loss": 0.1052,
|
84 |
+
"step": 110
|
85 |
+
},
|
86 |
+
{
|
87 |
+
"epoch": 1.85,
|
88 |
+
"learning_rate": 0.0001076923076923077,
|
89 |
+
"loss": 0.0751,
|
90 |
+
"step": 120
|
91 |
+
},
|
92 |
+
{
|
93 |
+
"epoch": 2.0,
|
94 |
+
"learning_rate": 0.0001,
|
95 |
+
"loss": 0.107,
|
96 |
+
"step": 130
|
97 |
+
},
|
98 |
+
{
|
99 |
+
"epoch": 2.15,
|
100 |
+
"learning_rate": 9.230769230769232e-05,
|
101 |
+
"loss": 0.0225,
|
102 |
+
"step": 140
|
103 |
+
},
|
104 |
+
{
|
105 |
+
"epoch": 2.31,
|
106 |
+
"learning_rate": 8.461538461538461e-05,
|
107 |
+
"loss": 0.0506,
|
108 |
+
"step": 150
|
109 |
+
},
|
110 |
+
{
|
111 |
+
"epoch": 2.46,
|
112 |
+
"learning_rate": 7.692307692307693e-05,
|
113 |
+
"loss": 0.018,
|
114 |
+
"step": 160
|
115 |
+
},
|
116 |
+
{
|
117 |
+
"epoch": 2.62,
|
118 |
+
"learning_rate": 6.923076923076924e-05,
|
119 |
+
"loss": 0.0444,
|
120 |
+
"step": 170
|
121 |
+
},
|
122 |
+
{
|
123 |
+
"epoch": 2.77,
|
124 |
+
"learning_rate": 6.153846153846155e-05,
|
125 |
+
"loss": 0.0305,
|
126 |
+
"step": 180
|
127 |
+
},
|
128 |
+
{
|
129 |
+
"epoch": 2.92,
|
130 |
+
"learning_rate": 5.384615384615385e-05,
|
131 |
+
"loss": 0.0317,
|
132 |
+
"step": 190
|
133 |
+
},
|
134 |
+
{
|
135 |
+
"epoch": 3.08,
|
136 |
+
"learning_rate": 4.615384615384616e-05,
|
137 |
+
"loss": 0.0169,
|
138 |
+
"step": 200
|
139 |
+
},
|
140 |
+
{
|
141 |
+
"epoch": 3.08,
|
142 |
+
"eval_accuracy": 0.9849624060150376,
|
143 |
+
"eval_loss": 0.062186792492866516,
|
144 |
+
"eval_runtime": 2.4481,
|
145 |
+
"eval_samples_per_second": 54.328,
|
146 |
+
"eval_steps_per_second": 6.944,
|
147 |
+
"step": 200
|
148 |
+
},
|
149 |
+
{
|
150 |
+
"epoch": 3.23,
|
151 |
+
"learning_rate": 3.846153846153846e-05,
|
152 |
+
"loss": 0.0116,
|
153 |
+
"step": 210
|
154 |
+
},
|
155 |
+
{
|
156 |
+
"epoch": 3.38,
|
157 |
+
"learning_rate": 3.0769230769230774e-05,
|
158 |
+
"loss": 0.0114,
|
159 |
+
"step": 220
|
160 |
+
},
|
161 |
+
{
|
162 |
+
"epoch": 3.54,
|
163 |
+
"learning_rate": 2.307692307692308e-05,
|
164 |
+
"loss": 0.0297,
|
165 |
+
"step": 230
|
166 |
+
},
|
167 |
+
{
|
168 |
+
"epoch": 3.69,
|
169 |
+
"learning_rate": 1.5384615384615387e-05,
|
170 |
+
"loss": 0.0105,
|
171 |
+
"step": 240
|
172 |
+
},
|
173 |
+
{
|
174 |
+
"epoch": 3.85,
|
175 |
+
"learning_rate": 7.692307692307694e-06,
|
176 |
+
"loss": 0.0107,
|
177 |
+
"step": 250
|
178 |
+
},
|
179 |
+
{
|
180 |
+
"epoch": 4.0,
|
181 |
+
"learning_rate": 0.0,
|
182 |
+
"loss": 0.011,
|
183 |
+
"step": 260
|
184 |
+
},
|
185 |
+
{
|
186 |
+
"epoch": 4.0,
|
187 |
+
"step": 260,
|
188 |
+
"total_flos": 3.205097416476426e+17,
|
189 |
+
"train_loss": 0.11557345737058383,
|
190 |
+
"train_runtime": 138.3777,
|
191 |
+
"train_samples_per_second": 29.889,
|
192 |
+
"train_steps_per_second": 1.879
|
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:8d6547cb2fe53f5474f5d5e537eb562df119a5e8ffebade5343b1c0338e9f2d1
|
3 |
+
size 4027
|