kg59 commited on
Commit
0dceb78
1 Parent(s): d3383dd

End of training

Browse files
README.md ADDED
@@ -0,0 +1,81 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ base_model: google/vit-base-patch16-224
4
+ tags:
5
+ - generated_from_trainer
6
+ datasets:
7
+ - imagefolder
8
+ metrics:
9
+ - accuracy
10
+ model-index:
11
+ - name: vit-base-patch16-224-finetuned-cedar
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: train
21
+ args: default
22
+ metrics:
23
+ - name: Accuracy
24
+ type: accuracy
25
+ value: 0.7882830626450116
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-finetuned-cedar
32
+
33
+ This model is a fine-tuned version of [google/vit-base-patch16-224](https://huggingface.co/google/vit-base-patch16-224) on the imagefolder dataset.
34
+ It achieves the following results on the evaluation set:
35
+ - Loss: 0.4667
36
+ - Accuracy: 0.7883
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: 32
57
+ - eval_batch_size: 32
58
+ - seed: 42
59
+ - gradient_accumulation_steps: 4
60
+ - total_train_batch_size: 128
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: 4
65
+
66
+ ### Training results
67
+
68
+ | Training Loss | Epoch | Step | Validation Loss | Accuracy |
69
+ |:-------------:|:-----:|:----:|:---------------:|:--------:|
70
+ | 0.5419 | 1.0 | 54 | 0.5085 | 0.7657 |
71
+ | 0.4541 | 2.0 | 108 | 0.4667 | 0.7883 |
72
+ | 0.3847 | 3.0 | 162 | 0.5603 | 0.7320 |
73
+ | 0.3669 | 4.0 | 216 | 0.4869 | 0.7749 |
74
+
75
+
76
+ ### Framework versions
77
+
78
+ - Transformers 4.35.2
79
+ - Pytorch 2.1.0+cu121
80
+ - Datasets 2.16.0
81
+ - Tokenizers 0.15.0
all_results.json ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "epoch": 4.0,
3
+ "eval_accuracy": 0.7882830626450116,
4
+ "eval_loss": 0.46672987937927246,
5
+ "eval_runtime": 28.0348,
6
+ "eval_samples_per_second": 61.495,
7
+ "eval_steps_per_second": 1.926,
8
+ "total_flos": 2.1362991696950723e+18,
9
+ "train_loss": 0.4688039951854282,
10
+ "train_runtime": 1140.3926,
11
+ "train_samples_per_second": 24.174,
12
+ "train_steps_per_second": 0.189
13
+ }
config.json ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "google/vit-base-patch16-224",
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": "full_forg",
13
+ "1": "full_org"
14
+ },
15
+ "image_size": 224,
16
+ "initializer_range": 0.02,
17
+ "intermediate_size": 3072,
18
+ "label2id": {
19
+ "full_forg": 0,
20
+ "full_org": 1
21
+ },
22
+ "layer_norm_eps": 1e-12,
23
+ "model_type": "vit",
24
+ "num_attention_heads": 12,
25
+ "num_channels": 3,
26
+ "num_hidden_layers": 12,
27
+ "patch_size": 16,
28
+ "problem_type": "single_label_classification",
29
+ "qkv_bias": true,
30
+ "torch_dtype": "float32",
31
+ "transformers_version": "4.35.2"
32
+ }
eval_results.json ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "epoch": 4.0,
3
+ "eval_accuracy": 0.7882830626450116,
4
+ "eval_loss": 0.46672987937927246,
5
+ "eval_runtime": 28.0348,
6
+ "eval_samples_per_second": 61.495,
7
+ "eval_steps_per_second": 1.926
8
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:bcbc2b11eb066b415099616c5eb05f5d680a9d969b9296fdc6fbfcdd70a67174
3
+ size 343223968
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
+ }
runs/Dec29_17-00-52_9d7cae9b6491/events.out.tfevents.1703869272.9d7cae9b6491.1030.0 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e019b29205d44231aea74a87a73990974420133fcac5e6778be698426a98a719
3
+ size 9181
runs/Dec29_17-00-52_9d7cae9b6491/events.out.tfevents.1703870457.9d7cae9b6491.1030.1 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a168abb6985a9f2904c7506507f0bfc7941620423a9984963bb9f4ab4ac142a7
3
+ size 411
train_results.json ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "epoch": 4.0,
3
+ "total_flos": 2.1362991696950723e+18,
4
+ "train_loss": 0.4688039951854282,
5
+ "train_runtime": 1140.3926,
6
+ "train_samples_per_second": 24.174,
7
+ "train_steps_per_second": 0.189
8
+ }
trainer_state.json ADDED
@@ -0,0 +1,190 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "best_metric": 0.7882830626450116,
3
+ "best_model_checkpoint": "vit-base-patch16-224-finetuned-cedar/checkpoint-108",
4
+ "epoch": 4.0,
5
+ "eval_steps": 500,
6
+ "global_step": 216,
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.19,
13
+ "learning_rate": 2.272727272727273e-05,
14
+ "loss": 0.7007,
15
+ "step": 10
16
+ },
17
+ {
18
+ "epoch": 0.37,
19
+ "learning_rate": 4.545454545454546e-05,
20
+ "loss": 0.6193,
21
+ "step": 20
22
+ },
23
+ {
24
+ "epoch": 0.56,
25
+ "learning_rate": 4.793814432989691e-05,
26
+ "loss": 0.5897,
27
+ "step": 30
28
+ },
29
+ {
30
+ "epoch": 0.74,
31
+ "learning_rate": 4.536082474226804e-05,
32
+ "loss": 0.5124,
33
+ "step": 40
34
+ },
35
+ {
36
+ "epoch": 0.93,
37
+ "learning_rate": 4.2783505154639175e-05,
38
+ "loss": 0.5419,
39
+ "step": 50
40
+ },
41
+ {
42
+ "epoch": 1.0,
43
+ "eval_accuracy": 0.765661252900232,
44
+ "eval_loss": 0.5085464119911194,
45
+ "eval_runtime": 27.8034,
46
+ "eval_samples_per_second": 62.007,
47
+ "eval_steps_per_second": 1.942,
48
+ "step": 54
49
+ },
50
+ {
51
+ "epoch": 1.11,
52
+ "learning_rate": 4.020618556701031e-05,
53
+ "loss": 0.4913,
54
+ "step": 60
55
+ },
56
+ {
57
+ "epoch": 1.3,
58
+ "learning_rate": 3.7628865979381445e-05,
59
+ "loss": 0.4795,
60
+ "step": 70
61
+ },
62
+ {
63
+ "epoch": 1.48,
64
+ "learning_rate": 3.5051546391752576e-05,
65
+ "loss": 0.4856,
66
+ "step": 80
67
+ },
68
+ {
69
+ "epoch": 1.67,
70
+ "learning_rate": 3.2474226804123714e-05,
71
+ "loss": 0.4715,
72
+ "step": 90
73
+ },
74
+ {
75
+ "epoch": 1.85,
76
+ "learning_rate": 2.9896907216494846e-05,
77
+ "loss": 0.4541,
78
+ "step": 100
79
+ },
80
+ {
81
+ "epoch": 2.0,
82
+ "eval_accuracy": 0.7882830626450116,
83
+ "eval_loss": 0.46672987937927246,
84
+ "eval_runtime": 27.8433,
85
+ "eval_samples_per_second": 61.918,
86
+ "eval_steps_per_second": 1.939,
87
+ "step": 108
88
+ },
89
+ {
90
+ "epoch": 2.04,
91
+ "learning_rate": 2.7319587628865977e-05,
92
+ "loss": 0.4464,
93
+ "step": 110
94
+ },
95
+ {
96
+ "epoch": 2.22,
97
+ "learning_rate": 2.4742268041237116e-05,
98
+ "loss": 0.4412,
99
+ "step": 120
100
+ },
101
+ {
102
+ "epoch": 2.41,
103
+ "learning_rate": 2.2164948453608247e-05,
104
+ "loss": 0.4327,
105
+ "step": 130
106
+ },
107
+ {
108
+ "epoch": 2.59,
109
+ "learning_rate": 1.9587628865979382e-05,
110
+ "loss": 0.4301,
111
+ "step": 140
112
+ },
113
+ {
114
+ "epoch": 2.78,
115
+ "learning_rate": 1.7010309278350517e-05,
116
+ "loss": 0.4184,
117
+ "step": 150
118
+ },
119
+ {
120
+ "epoch": 2.96,
121
+ "learning_rate": 1.4432989690721649e-05,
122
+ "loss": 0.3847,
123
+ "step": 160
124
+ },
125
+ {
126
+ "epoch": 3.0,
127
+ "eval_accuracy": 0.7320185614849188,
128
+ "eval_loss": 0.5602948069572449,
129
+ "eval_runtime": 27.4724,
130
+ "eval_samples_per_second": 62.754,
131
+ "eval_steps_per_second": 1.966,
132
+ "step": 162
133
+ },
134
+ {
135
+ "epoch": 3.15,
136
+ "learning_rate": 1.1855670103092783e-05,
137
+ "loss": 0.4003,
138
+ "step": 170
139
+ },
140
+ {
141
+ "epoch": 3.33,
142
+ "learning_rate": 9.278350515463918e-06,
143
+ "loss": 0.4209,
144
+ "step": 180
145
+ },
146
+ {
147
+ "epoch": 3.52,
148
+ "learning_rate": 6.701030927835052e-06,
149
+ "loss": 0.405,
150
+ "step": 190
151
+ },
152
+ {
153
+ "epoch": 3.7,
154
+ "learning_rate": 4.123711340206186e-06,
155
+ "loss": 0.4026,
156
+ "step": 200
157
+ },
158
+ {
159
+ "epoch": 3.89,
160
+ "learning_rate": 1.5463917525773197e-06,
161
+ "loss": 0.3669,
162
+ "step": 210
163
+ },
164
+ {
165
+ "epoch": 4.0,
166
+ "eval_accuracy": 0.7749419953596288,
167
+ "eval_loss": 0.4869101941585541,
168
+ "eval_runtime": 27.2972,
169
+ "eval_samples_per_second": 63.157,
170
+ "eval_steps_per_second": 1.978,
171
+ "step": 216
172
+ },
173
+ {
174
+ "epoch": 4.0,
175
+ "step": 216,
176
+ "total_flos": 2.1362991696950723e+18,
177
+ "train_loss": 0.4688039951854282,
178
+ "train_runtime": 1140.3926,
179
+ "train_samples_per_second": 24.174,
180
+ "train_steps_per_second": 0.189
181
+ }
182
+ ],
183
+ "logging_steps": 10,
184
+ "max_steps": 216,
185
+ "num_train_epochs": 4,
186
+ "save_steps": 500,
187
+ "total_flos": 2.1362991696950723e+18,
188
+ "trial_name": null,
189
+ "trial_params": null
190
+ }
training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:854519fb4c4284fa2c3d12a55bd101f08476a8fbb772abe88e4ac5d80f05e9db
3
+ size 4600