sharmajai901 commited on
Commit
88ecbeb
1 Parent(s): 2c98441

End of training

Browse files
README.md ADDED
@@ -0,0 +1,84 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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: UL_base_classification
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.8921161825726142
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
+ # UL_base_classification
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.3125
36
+ - Accuracy: 0.8921
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: 7
65
+
66
+ ### Training results
67
+
68
+ | Training Loss | Epoch | Step | Validation Loss | Accuracy |
69
+ |:-------------:|:------:|:----:|:---------------:|:--------:|
70
+ | 0.8296 | 0.9756 | 20 | 0.5683 | 0.8230 |
71
+ | 0.4462 | 2.0 | 41 | 0.3949 | 0.8603 |
72
+ | 0.3588 | 2.9756 | 61 | 0.3633 | 0.8575 |
73
+ | 0.3196 | 4.0 | 82 | 0.3247 | 0.8852 |
74
+ | 0.2921 | 4.9756 | 102 | 0.3374 | 0.8728 |
75
+ | 0.2688 | 6.0 | 123 | 0.3125 | 0.8921 |
76
+ | 0.2366 | 6.8293 | 140 | 0.3137 | 0.8866 |
77
+
78
+
79
+ ### Framework versions
80
+
81
+ - Transformers 4.41.2
82
+ - Pytorch 2.3.0+cu121
83
+ - Datasets 2.19.2
84
+ - Tokenizers 0.19.1
all_results.json ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "epoch": 6.829268292682927,
3
+ "eval_accuracy": 0.8921161825726142,
4
+ "eval_loss": 0.3124912977218628,
5
+ "eval_runtime": 28.6771,
6
+ "eval_samples_per_second": 25.212,
7
+ "eval_steps_per_second": 0.802,
8
+ "total_flos": 1.3849740766444585e+18,
9
+ "train_loss": 0.4427596058164324,
10
+ "train_runtime": 1849.9588,
11
+ "train_samples_per_second": 9.899,
12
+ "train_steps_per_second": 0.076
13
+ }
config.json ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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": "bedrooms",
13
+ "1": "exterior",
14
+ "2": "floorPlans",
15
+ "3": "interior",
16
+ "4": "others"
17
+ },
18
+ "image_size": 224,
19
+ "initializer_range": 0.02,
20
+ "intermediate_size": 3072,
21
+ "label2id": {
22
+ "bedrooms": 0,
23
+ "exterior": 1,
24
+ "floorPlans": 2,
25
+ "interior": 3,
26
+ "others": 4
27
+ },
28
+ "layer_norm_eps": 1e-12,
29
+ "model_type": "vit",
30
+ "num_attention_heads": 12,
31
+ "num_channels": 3,
32
+ "num_hidden_layers": 12,
33
+ "patch_size": 16,
34
+ "problem_type": "single_label_classification",
35
+ "qkv_bias": true,
36
+ "torch_dtype": "float32",
37
+ "transformers_version": "4.41.2"
38
+ }
eval_results.json ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "epoch": 6.829268292682927,
3
+ "eval_accuracy": 0.8921161825726142,
4
+ "eval_loss": 0.3124912977218628,
5
+ "eval_runtime": 28.6771,
6
+ "eval_samples_per_second": 25.212,
7
+ "eval_steps_per_second": 0.802
8
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5cfcf2240c8df96c8db1c45765ba0c91c35b180eb30355fec033e10b801fe97f
3
+ size 343233204
preprocessor_config.json ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_valid_processor_keys": [
3
+ "images",
4
+ "do_resize",
5
+ "size",
6
+ "resample",
7
+ "do_rescale",
8
+ "rescale_factor",
9
+ "do_normalize",
10
+ "image_mean",
11
+ "image_std",
12
+ "return_tensors",
13
+ "data_format",
14
+ "input_data_format"
15
+ ],
16
+ "do_normalize": true,
17
+ "do_rescale": true,
18
+ "do_resize": true,
19
+ "image_mean": [
20
+ 0.5,
21
+ 0.5,
22
+ 0.5
23
+ ],
24
+ "image_processor_type": "ViTImageProcessor",
25
+ "image_std": [
26
+ 0.5,
27
+ 0.5,
28
+ 0.5
29
+ ],
30
+ "resample": 2,
31
+ "rescale_factor": 0.00392156862745098,
32
+ "size": {
33
+ "height": 224,
34
+ "width": 224
35
+ }
36
+ }
runs/Jun11_09-29-23_c706598b3e1f/events.out.tfevents.1718098183.c706598b3e1f.1099.0 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:61cc4d8868079102a6a3a6873b6fe5f183b4a642deffa18f9020118593ccec55
3
+ size 10445
runs/Jun11_09-29-23_c706598b3e1f/events.out.tfevents.1718100119.c706598b3e1f.1099.1 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ed8b46fc875b3e564b25bf115eeda139794baca4954cddf66085701e6df25693
3
+ size 411
train_results.json ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "epoch": 6.829268292682927,
3
+ "total_flos": 1.3849740766444585e+18,
4
+ "train_loss": 0.4427596058164324,
5
+ "train_runtime": 1849.9588,
6
+ "train_samples_per_second": 9.899,
7
+ "train_steps_per_second": 0.076
8
+ }
trainer_state.json ADDED
@@ -0,0 +1,203 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "best_metric": 0.8921161825726142,
3
+ "best_model_checkpoint": "UL_base_classification/checkpoint-123",
4
+ "epoch": 6.829268292682927,
5
+ "eval_steps": 500,
6
+ "global_step": 140,
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.4878048780487805,
13
+ "grad_norm": 4.009415149688721,
14
+ "learning_rate": 3.571428571428572e-05,
15
+ "loss": 1.4657,
16
+ "step": 10
17
+ },
18
+ {
19
+ "epoch": 0.975609756097561,
20
+ "grad_norm": 1.9595946073532104,
21
+ "learning_rate": 4.761904761904762e-05,
22
+ "loss": 0.8296,
23
+ "step": 20
24
+ },
25
+ {
26
+ "epoch": 0.975609756097561,
27
+ "eval_accuracy": 0.8229598893499308,
28
+ "eval_loss": 0.5682700872421265,
29
+ "eval_runtime": 28.9624,
30
+ "eval_samples_per_second": 24.963,
31
+ "eval_steps_per_second": 0.794,
32
+ "step": 20
33
+ },
34
+ {
35
+ "epoch": 1.4634146341463414,
36
+ "grad_norm": 1.4578920602798462,
37
+ "learning_rate": 4.3650793650793655e-05,
38
+ "loss": 0.5174,
39
+ "step": 30
40
+ },
41
+ {
42
+ "epoch": 1.951219512195122,
43
+ "grad_norm": 1.6582454442977905,
44
+ "learning_rate": 3.968253968253968e-05,
45
+ "loss": 0.4462,
46
+ "step": 40
47
+ },
48
+ {
49
+ "epoch": 2.0,
50
+ "eval_accuracy": 0.8603042876901799,
51
+ "eval_loss": 0.3948992192745209,
52
+ "eval_runtime": 28.607,
53
+ "eval_samples_per_second": 25.274,
54
+ "eval_steps_per_second": 0.804,
55
+ "step": 41
56
+ },
57
+ {
58
+ "epoch": 2.4390243902439024,
59
+ "grad_norm": 1.9573261737823486,
60
+ "learning_rate": 3.571428571428572e-05,
61
+ "loss": 0.3861,
62
+ "step": 50
63
+ },
64
+ {
65
+ "epoch": 2.926829268292683,
66
+ "grad_norm": 2.927914619445801,
67
+ "learning_rate": 3.1746031746031745e-05,
68
+ "loss": 0.3588,
69
+ "step": 60
70
+ },
71
+ {
72
+ "epoch": 2.975609756097561,
73
+ "eval_accuracy": 0.8575380359612724,
74
+ "eval_loss": 0.3632887601852417,
75
+ "eval_runtime": 27.4966,
76
+ "eval_samples_per_second": 26.294,
77
+ "eval_steps_per_second": 0.836,
78
+ "step": 61
79
+ },
80
+ {
81
+ "epoch": 3.4146341463414633,
82
+ "grad_norm": 2.270343065261841,
83
+ "learning_rate": 2.777777777777778e-05,
84
+ "loss": 0.2995,
85
+ "step": 70
86
+ },
87
+ {
88
+ "epoch": 3.902439024390244,
89
+ "grad_norm": 2.323387622833252,
90
+ "learning_rate": 2.380952380952381e-05,
91
+ "loss": 0.3196,
92
+ "step": 80
93
+ },
94
+ {
95
+ "epoch": 4.0,
96
+ "eval_accuracy": 0.8852005532503457,
97
+ "eval_loss": 0.3247418701648712,
98
+ "eval_runtime": 28.061,
99
+ "eval_samples_per_second": 25.765,
100
+ "eval_steps_per_second": 0.82,
101
+ "step": 82
102
+ },
103
+ {
104
+ "epoch": 4.390243902439025,
105
+ "grad_norm": 1.6208417415618896,
106
+ "learning_rate": 1.984126984126984e-05,
107
+ "loss": 0.2878,
108
+ "step": 90
109
+ },
110
+ {
111
+ "epoch": 4.878048780487805,
112
+ "grad_norm": 1.3482733964920044,
113
+ "learning_rate": 1.5873015873015872e-05,
114
+ "loss": 0.2921,
115
+ "step": 100
116
+ },
117
+ {
118
+ "epoch": 4.975609756097561,
119
+ "eval_accuracy": 0.8727524204702628,
120
+ "eval_loss": 0.3373877704143524,
121
+ "eval_runtime": 28.0046,
122
+ "eval_samples_per_second": 25.817,
123
+ "eval_steps_per_second": 0.821,
124
+ "step": 102
125
+ },
126
+ {
127
+ "epoch": 5.365853658536586,
128
+ "grad_norm": 1.1717610359191895,
129
+ "learning_rate": 1.1904761904761905e-05,
130
+ "loss": 0.2319,
131
+ "step": 110
132
+ },
133
+ {
134
+ "epoch": 5.853658536585366,
135
+ "grad_norm": 1.3873180150985718,
136
+ "learning_rate": 7.936507936507936e-06,
137
+ "loss": 0.2688,
138
+ "step": 120
139
+ },
140
+ {
141
+ "epoch": 6.0,
142
+ "eval_accuracy": 0.8921161825726142,
143
+ "eval_loss": 0.3124912977218628,
144
+ "eval_runtime": 28.2402,
145
+ "eval_samples_per_second": 25.602,
146
+ "eval_steps_per_second": 0.814,
147
+ "step": 123
148
+ },
149
+ {
150
+ "epoch": 6.341463414634147,
151
+ "grad_norm": 1.7034335136413574,
152
+ "learning_rate": 3.968253968253968e-06,
153
+ "loss": 0.2583,
154
+ "step": 130
155
+ },
156
+ {
157
+ "epoch": 6.829268292682927,
158
+ "grad_norm": 1.5103542804718018,
159
+ "learning_rate": 0.0,
160
+ "loss": 0.2366,
161
+ "step": 140
162
+ },
163
+ {
164
+ "epoch": 6.829268292682927,
165
+ "eval_accuracy": 0.8865836791147994,
166
+ "eval_loss": 0.3137405514717102,
167
+ "eval_runtime": 28.632,
168
+ "eval_samples_per_second": 25.251,
169
+ "eval_steps_per_second": 0.803,
170
+ "step": 140
171
+ },
172
+ {
173
+ "epoch": 6.829268292682927,
174
+ "step": 140,
175
+ "total_flos": 1.3849740766444585e+18,
176
+ "train_loss": 0.4427596058164324,
177
+ "train_runtime": 1849.9588,
178
+ "train_samples_per_second": 9.899,
179
+ "train_steps_per_second": 0.076
180
+ }
181
+ ],
182
+ "logging_steps": 10,
183
+ "max_steps": 140,
184
+ "num_input_tokens_seen": 0,
185
+ "num_train_epochs": 7,
186
+ "save_steps": 500,
187
+ "stateful_callbacks": {
188
+ "TrainerControl": {
189
+ "args": {
190
+ "should_epoch_stop": false,
191
+ "should_evaluate": false,
192
+ "should_log": false,
193
+ "should_save": true,
194
+ "should_training_stop": true
195
+ },
196
+ "attributes": {}
197
+ }
198
+ },
199
+ "total_flos": 1.3849740766444585e+18,
200
+ "train_batch_size": 32,
201
+ "trial_name": null,
202
+ "trial_params": null
203
+ }
training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:49fcc8be95a7679d08cb5ed8d357817d085a172e20e8623995fcb4f118f05a6d
3
+ size 5112