andrei-teodor commited on
Commit
ba1e468
1 Parent(s): 761cc8f

Brain MRI fine tune run - 20 epochs.

Browse files
README.md CHANGED
@@ -3,6 +3,7 @@ library_name: transformers
3
  license: apache-2.0
4
  base_model: google/vit-base-patch16-224
5
  tags:
 
6
  - generated_from_trainer
7
  metrics:
8
  - accuracy
@@ -16,10 +17,10 @@ should probably proofread and complete it, then remove this comment. -->
16
 
17
  # vit-base-brain-mri
18
 
19
- This model is a fine-tuned version of [google/vit-base-patch16-224](https://huggingface.co/google/vit-base-patch16-224) on an unknown dataset.
20
  It achieves the following results on the evaluation set:
21
- - Loss: 0.4598
22
- - Accuracy: 0.8659
23
 
24
  ## Model description
25
 
 
3
  license: apache-2.0
4
  base_model: google/vit-base-patch16-224
5
  tags:
6
+ - image-classification
7
  - generated_from_trainer
8
  metrics:
9
  - accuracy
 
17
 
18
  # vit-base-brain-mri
19
 
20
+ This model is a fine-tuned version of [google/vit-base-patch16-224](https://huggingface.co/google/vit-base-patch16-224) on the BrainMRI dataset.
21
  It achieves the following results on the evaluation set:
22
+ - Loss: 1.0577
23
+ - Accuracy: 0.5990
24
 
25
  ## Model description
26
 
all_results.json CHANGED
@@ -1,13 +1,13 @@
1
  {
2
- "epoch": 15.0,
3
- "eval_accuracy": 0.5685279187817259,
4
- "eval_loss": 1.129746437072754,
5
- "eval_runtime": 3.3762,
6
- "eval_samples_per_second": 116.699,
7
- "eval_steps_per_second": 14.809,
8
- "total_flos": 2.6688719619794534e+18,
9
- "train_loss": 0.03615495540477611,
10
- "train_runtime": 26.3241,
11
- "train_samples_per_second": 1308.306,
12
- "train_steps_per_second": 41.027
13
  }
 
1
  {
2
+ "epoch": 20.0,
3
+ "eval_accuracy": 0.5989847715736041,
4
+ "eval_loss": 1.057724118232727,
5
+ "eval_runtime": 3.0042,
6
+ "eval_samples_per_second": 131.149,
7
+ "eval_steps_per_second": 16.643,
8
+ "total_flos": 3.558495949305938e+18,
9
+ "train_loss": 0.5529726452297634,
10
+ "train_runtime": 477.7876,
11
+ "train_samples_per_second": 96.11,
12
+ "train_steps_per_second": 3.014
13
  }
eval_results.json CHANGED
@@ -1,8 +1,8 @@
1
  {
2
- "epoch": 15.0,
3
- "eval_accuracy": 0.5685279187817259,
4
- "eval_loss": 1.129746437072754,
5
- "eval_runtime": 3.3762,
6
- "eval_samples_per_second": 116.699,
7
- "eval_steps_per_second": 14.809
8
  }
 
1
  {
2
+ "epoch": 20.0,
3
+ "eval_accuracy": 0.5989847715736041,
4
+ "eval_loss": 1.057724118232727,
5
+ "eval_runtime": 3.0042,
6
+ "eval_samples_per_second": 131.149,
7
+ "eval_steps_per_second": 16.643
8
  }
runs/Aug28_15-52-04_DESKTOP-4SGMSGR/events.out.tfevents.1724850055.DESKTOP-4SGMSGR.2900.1 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:07bee8e181d6479e4cf7e652479306ddba587305125fc051df3ecc3a2351f532
3
+ size 363
train_results.json CHANGED
@@ -1,8 +1,8 @@
1
  {
2
- "epoch": 15.0,
3
- "total_flos": 2.6688719619794534e+18,
4
- "train_loss": 0.03615495540477611,
5
- "train_runtime": 26.3241,
6
- "train_samples_per_second": 1308.306,
7
- "train_steps_per_second": 41.027
8
  }
 
1
  {
2
+ "epoch": 20.0,
3
+ "total_flos": 3.558495949305938e+18,
4
+ "train_loss": 0.5529726452297634,
5
+ "train_runtime": 477.7876,
6
+ "train_samples_per_second": 96.11,
7
+ "train_steps_per_second": 3.014
8
  }
trainer_state.json CHANGED
@@ -1,232 +1,305 @@
1
  {
2
- "best_metric": 0.5857352614402771,
3
- "best_model_checkpoint": "./vit-base-brain-mri\\checkpoint-1008",
4
- "epoch": 15.0,
5
  "eval_steps": 500,
6
- "global_step": 1080,
7
  "is_hyper_param_search": false,
8
  "is_local_process_zero": true,
9
  "is_world_process_zero": true,
10
  "log_history": [
11
  {
12
  "epoch": 1.0,
13
- "eval_accuracy": 0.6289198606271778,
14
- "eval_loss": 0.9818006753921509,
15
- "eval_runtime": 4.8676,
16
- "eval_samples_per_second": 117.922,
17
- "eval_steps_per_second": 14.792,
18
  "step": 72
19
  },
20
  {
21
  "epoch": 1.3888888888888888,
22
- "grad_norm": 2.2408666610717773,
23
- "learning_rate": 0.00021666666666666666,
24
- "loss": 1.0744,
25
  "step": 100
26
  },
27
  {
28
  "epoch": 2.0,
29
- "eval_accuracy": 0.686411149825784,
30
- "eval_loss": 0.8286930322647095,
31
- "eval_runtime": 4.7946,
32
- "eval_samples_per_second": 119.718,
33
- "eval_steps_per_second": 15.017,
34
  "step": 144
35
  },
36
  {
37
  "epoch": 2.7777777777777777,
38
- "grad_norm": 4.1483378410339355,
39
- "learning_rate": 0.0001333333333333333,
40
- "loss": 0.7716,
41
  "step": 200
42
  },
43
  {
44
  "epoch": 3.0,
45
- "eval_accuracy": 0.7160278745644599,
46
- "eval_loss": 0.7534749507904053,
47
- "eval_runtime": 4.9187,
48
- "eval_samples_per_second": 116.696,
49
- "eval_steps_per_second": 14.638,
50
  "step": 216
51
  },
52
  {
53
  "epoch": 4.0,
54
- "eval_accuracy": 0.740418118466899,
55
- "eval_loss": 0.7139923572540283,
56
- "eval_runtime": 4.8084,
57
- "eval_samples_per_second": 119.374,
58
- "eval_steps_per_second": 14.974,
59
  "step": 288
60
  },
61
  {
62
  "epoch": 4.166666666666667,
63
- "grad_norm": 3.2614974975585938,
64
- "learning_rate": 4.9999999999999996e-05,
65
- "loss": 0.6975,
66
  "step": 300
67
  },
68
  {
69
  "epoch": 5.0,
70
- "eval_accuracy": 0.7491289198606271,
71
- "eval_loss": 0.7015281915664673,
72
- "eval_runtime": 4.8073,
73
- "eval_samples_per_second": 119.403,
74
- "eval_steps_per_second": 14.977,
75
  "step": 360
76
  },
77
  {
78
  "epoch": 5.555555555555555,
79
- "grad_norm": 1.9345481395721436,
80
- "learning_rate": 0.0001333333333333333,
81
- "loss": 0.6651,
82
  "step": 400
83
  },
84
  {
85
  "epoch": 6.0,
86
- "eval_accuracy": 0.7630662020905923,
87
- "eval_loss": 0.68391352891922,
88
- "eval_runtime": 4.8866,
89
- "eval_samples_per_second": 117.465,
90
- "eval_steps_per_second": 14.734,
91
  "step": 432
92
  },
93
  {
94
  "epoch": 6.944444444444445,
95
- "grad_norm": 2.201732635498047,
96
- "learning_rate": 9.166666666666667e-05,
97
- "loss": 0.6307,
98
  "step": 500
99
  },
100
  {
101
  "epoch": 7.0,
102
- "eval_accuracy": 0.7700348432055749,
103
- "eval_loss": 0.6623685359954834,
104
- "eval_runtime": 4.9432,
105
- "eval_samples_per_second": 116.118,
106
- "eval_steps_per_second": 14.565,
107
  "step": 504
108
  },
109
  {
110
  "epoch": 8.0,
111
- "eval_accuracy": 0.7822299651567944,
112
- "eval_loss": 0.6363218426704407,
113
- "eval_runtime": 4.9241,
114
- "eval_samples_per_second": 116.57,
115
- "eval_steps_per_second": 14.622,
116
  "step": 576
117
  },
118
  {
119
  "epoch": 8.333333333333334,
120
- "grad_norm": 1.8554637432098389,
121
- "learning_rate": 4.9999999999999996e-05,
122
- "loss": 0.5857,
123
  "step": 600
124
  },
125
  {
126
  "epoch": 9.0,
127
- "eval_accuracy": 0.7822299651567944,
128
- "eval_loss": 0.6089015603065491,
129
- "eval_runtime": 4.9259,
130
- "eval_samples_per_second": 116.527,
131
- "eval_steps_per_second": 14.617,
132
  "step": 648
133
  },
134
  {
135
  "epoch": 9.722222222222221,
136
- "grad_norm": 3.4061734676361084,
137
- "learning_rate": 8.333333333333332e-06,
138
- "loss": 0.576,
139
  "step": 700
140
  },
141
  {
142
  "epoch": 10.0,
143
- "eval_accuracy": 0.7770034843205574,
144
- "eval_loss": 0.6249111294746399,
145
- "eval_runtime": 5.1184,
146
- "eval_samples_per_second": 112.144,
147
- "eval_steps_per_second": 14.067,
148
  "step": 720
149
  },
150
  {
151
  "epoch": 11.0,
152
- "eval_accuracy": 0.7839721254355401,
153
- "eval_loss": 0.6184366941452026,
154
- "eval_runtime": 4.8681,
155
- "eval_samples_per_second": 117.91,
156
- "eval_steps_per_second": 14.79,
157
  "step": 792
158
  },
159
  {
160
  "epoch": 11.11111111111111,
161
- "grad_norm": 2.4091649055480957,
162
- "learning_rate": 6.190476190476189e-05,
163
- "loss": 0.5733,
164
  "step": 800
165
  },
166
  {
167
  "epoch": 12.0,
168
- "eval_accuracy": 0.794425087108014,
169
- "eval_loss": 0.6006320714950562,
170
- "eval_runtime": 4.8997,
171
- "eval_samples_per_second": 117.151,
172
- "eval_steps_per_second": 14.695,
173
  "step": 864
174
  },
175
  {
176
  "epoch": 12.5,
177
- "grad_norm": 2.6921584606170654,
178
- "learning_rate": 3.214285714285714e-05,
179
- "loss": 0.5555,
180
  "step": 900
181
  },
182
  {
183
  "epoch": 13.0,
184
- "eval_accuracy": 0.8013937282229965,
185
- "eval_loss": 0.5897805690765381,
186
- "eval_runtime": 4.8766,
187
- "eval_samples_per_second": 117.705,
188
- "eval_steps_per_second": 14.764,
189
  "step": 936
190
  },
191
  {
192
  "epoch": 13.88888888888889,
193
- "grad_norm": 1.2396776676177979,
194
- "learning_rate": 2.3809523809523808e-06,
195
- "loss": 0.5481,
196
  "step": 1000
197
  },
198
  {
199
  "epoch": 14.0,
200
- "eval_accuracy": 0.8222996515679443,
201
- "eval_loss": 0.5857352614402771,
202
- "eval_runtime": 4.9368,
203
- "eval_samples_per_second": 116.27,
204
- "eval_steps_per_second": 14.584,
205
  "step": 1008
206
  },
207
  {
208
  "epoch": 15.0,
209
- "eval_accuracy": 0.7857142857142857,
210
- "eval_loss": 0.5991856455802917,
211
- "eval_runtime": 5.1206,
212
- "eval_samples_per_second": 112.096,
213
- "eval_steps_per_second": 14.061,
214
  "step": 1080
215
  },
216
  {
217
- "epoch": 15.0,
218
- "step": 1080,
219
- "total_flos": 2.6688719619794534e+18,
220
- "train_loss": 0.03615495540477611,
221
- "train_runtime": 26.3241,
222
- "train_samples_per_second": 1308.306,
223
- "train_steps_per_second": 41.027
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
224
  }
225
  ],
226
  "logging_steps": 100,
227
- "max_steps": 1080,
228
  "num_input_tokens_seen": 0,
229
- "num_train_epochs": 15,
230
  "save_steps": 500,
231
  "stateful_callbacks": {
232
  "TrainerControl": {
@@ -240,7 +313,7 @@
240
  "attributes": {}
241
  }
242
  },
243
- "total_flos": 2.6688719619794534e+18,
244
  "train_batch_size": 32,
245
  "trial_name": null,
246
  "trial_params": null
 
1
  {
2
+ "best_metric": 0.4597996771335602,
3
+ "best_model_checkpoint": "./vit-base-brain-mri\\checkpoint-1440",
4
+ "epoch": 20.0,
5
  "eval_steps": 500,
6
+ "global_step": 1440,
7
  "is_hyper_param_search": false,
8
  "is_local_process_zero": true,
9
  "is_world_process_zero": true,
10
  "log_history": [
11
  {
12
  "epoch": 1.0,
13
+ "eval_accuracy": 0.6097560975609756,
14
+ "eval_loss": 0.998555600643158,
15
+ "eval_runtime": 4.892,
16
+ "eval_samples_per_second": 117.334,
17
+ "eval_steps_per_second": 14.718,
18
  "step": 72
19
  },
20
  {
21
  "epoch": 1.3888888888888888,
22
+ "grad_norm": 2.622373342514038,
23
+ "learning_rate": 0.00027916666666666666,
24
+ "loss": 1.098,
25
  "step": 100
26
  },
27
  {
28
  "epoch": 2.0,
29
+ "eval_accuracy": 0.7003484320557491,
30
+ "eval_loss": 0.8445045948028564,
31
+ "eval_runtime": 4.8929,
32
+ "eval_samples_per_second": 117.312,
33
+ "eval_steps_per_second": 14.715,
34
  "step": 144
35
  },
36
  {
37
  "epoch": 2.7777777777777777,
38
+ "grad_norm": 4.336460590362549,
39
+ "learning_rate": 0.00025833333333333334,
40
+ "loss": 0.7895,
41
  "step": 200
42
  },
43
  {
44
  "epoch": 3.0,
45
+ "eval_accuracy": 0.7526132404181185,
46
+ "eval_loss": 0.7317853569984436,
47
+ "eval_runtime": 4.7479,
48
+ "eval_samples_per_second": 120.896,
49
+ "eval_steps_per_second": 15.165,
50
  "step": 216
51
  },
52
  {
53
  "epoch": 4.0,
54
+ "eval_accuracy": 0.7473867595818815,
55
+ "eval_loss": 0.6842443943023682,
56
+ "eval_runtime": 4.5716,
57
+ "eval_samples_per_second": 125.558,
58
+ "eval_steps_per_second": 15.749,
59
  "step": 288
60
  },
61
  {
62
  "epoch": 4.166666666666667,
63
+ "grad_norm": 3.367997169494629,
64
+ "learning_rate": 0.00023749999999999997,
65
+ "loss": 0.6629,
66
  "step": 300
67
  },
68
  {
69
  "epoch": 5.0,
70
+ "eval_accuracy": 0.7857142857142857,
71
+ "eval_loss": 0.6328176856040955,
72
+ "eval_runtime": 4.5619,
73
+ "eval_samples_per_second": 125.825,
74
+ "eval_steps_per_second": 15.783,
75
  "step": 360
76
  },
77
  {
78
  "epoch": 5.555555555555555,
79
+ "grad_norm": 2.0712759494781494,
80
+ "learning_rate": 0.00021666666666666666,
81
+ "loss": 0.5966,
82
  "step": 400
83
  },
84
  {
85
  "epoch": 6.0,
86
+ "eval_accuracy": 0.8101045296167247,
87
+ "eval_loss": 0.5956693291664124,
88
+ "eval_runtime": 4.6073,
89
+ "eval_samples_per_second": 124.585,
90
+ "eval_steps_per_second": 15.627,
91
  "step": 432
92
  },
93
  {
94
  "epoch": 6.944444444444445,
95
+ "grad_norm": 1.491408348083496,
96
+ "learning_rate": 0.00019583333333333331,
97
+ "loss": 0.5546,
98
  "step": 500
99
  },
100
  {
101
  "epoch": 7.0,
102
+ "eval_accuracy": 0.8118466898954704,
103
+ "eval_loss": 0.5646191835403442,
104
+ "eval_runtime": 4.5982,
105
+ "eval_samples_per_second": 124.83,
106
+ "eval_steps_per_second": 15.658,
107
  "step": 504
108
  },
109
  {
110
  "epoch": 8.0,
111
+ "eval_accuracy": 0.8048780487804879,
112
+ "eval_loss": 0.5646994709968567,
113
+ "eval_runtime": 4.6362,
114
+ "eval_samples_per_second": 123.809,
115
+ "eval_steps_per_second": 15.53,
116
  "step": 576
117
  },
118
  {
119
  "epoch": 8.333333333333334,
120
+ "grad_norm": 1.5481159687042236,
121
+ "learning_rate": 0.000175,
122
+ "loss": 0.5113,
123
  "step": 600
124
  },
125
  {
126
  "epoch": 9.0,
127
+ "eval_accuracy": 0.8275261324041812,
128
+ "eval_loss": 0.5340307354927063,
129
+ "eval_runtime": 4.6122,
130
+ "eval_samples_per_second": 124.453,
131
+ "eval_steps_per_second": 15.611,
132
  "step": 648
133
  },
134
  {
135
  "epoch": 9.722222222222221,
136
+ "grad_norm": 2.323460817337036,
137
+ "learning_rate": 0.00015416666666666663,
138
+ "loss": 0.4882,
139
  "step": 700
140
  },
141
  {
142
  "epoch": 10.0,
143
+ "eval_accuracy": 0.8327526132404182,
144
+ "eval_loss": 0.5189912915229797,
145
+ "eval_runtime": 4.6128,
146
+ "eval_samples_per_second": 124.435,
147
+ "eval_steps_per_second": 15.609,
148
  "step": 720
149
  },
150
  {
151
  "epoch": 11.0,
152
+ "eval_accuracy": 0.8327526132404182,
153
+ "eval_loss": 0.5197045803070068,
154
+ "eval_runtime": 4.6509,
155
+ "eval_samples_per_second": 123.417,
156
+ "eval_steps_per_second": 15.481,
157
  "step": 792
158
  },
159
  {
160
  "epoch": 11.11111111111111,
161
+ "grad_norm": 2.1213157176971436,
162
+ "learning_rate": 0.0001333333333333333,
163
+ "loss": 0.4789,
164
  "step": 800
165
  },
166
  {
167
  "epoch": 12.0,
168
+ "eval_accuracy": 0.8257839721254355,
169
+ "eval_loss": 0.5001842975616455,
170
+ "eval_runtime": 4.5564,
171
+ "eval_samples_per_second": 125.977,
172
+ "eval_steps_per_second": 15.802,
173
  "step": 864
174
  },
175
  {
176
  "epoch": 12.5,
177
+ "grad_norm": 1.9881811141967773,
178
+ "learning_rate": 0.0001125,
179
+ "loss": 0.4582,
180
  "step": 900
181
  },
182
  {
183
  "epoch": 13.0,
184
+ "eval_accuracy": 0.8310104529616724,
185
+ "eval_loss": 0.4956616163253784,
186
+ "eval_runtime": 4.5548,
187
+ "eval_samples_per_second": 126.02,
188
+ "eval_steps_per_second": 15.807,
189
  "step": 936
190
  },
191
  {
192
  "epoch": 13.88888888888889,
193
+ "grad_norm": 2.0128438472747803,
194
+ "learning_rate": 9.166666666666667e-05,
195
+ "loss": 0.4426,
196
  "step": 1000
197
  },
198
  {
199
  "epoch": 14.0,
200
+ "eval_accuracy": 0.8310104529616724,
201
+ "eval_loss": 0.4820682108402252,
202
+ "eval_runtime": 4.6027,
203
+ "eval_samples_per_second": 124.708,
204
+ "eval_steps_per_second": 15.643,
205
  "step": 1008
206
  },
207
  {
208
  "epoch": 15.0,
209
+ "eval_accuracy": 0.8466898954703833,
210
+ "eval_loss": 0.4706496000289917,
211
+ "eval_runtime": 4.5952,
212
+ "eval_samples_per_second": 124.913,
213
+ "eval_steps_per_second": 15.669,
214
  "step": 1080
215
  },
216
  {
217
+ "epoch": 15.277777777777779,
218
+ "grad_norm": 1.9610830545425415,
219
+ "learning_rate": 7.083333333333332e-05,
220
+ "loss": 0.4328,
221
+ "step": 1100
222
+ },
223
+ {
224
+ "epoch": 16.0,
225
+ "eval_accuracy": 0.8153310104529616,
226
+ "eval_loss": 0.4820646047592163,
227
+ "eval_runtime": 4.6291,
228
+ "eval_samples_per_second": 123.999,
229
+ "eval_steps_per_second": 15.554,
230
+ "step": 1152
231
+ },
232
+ {
233
+ "epoch": 16.666666666666668,
234
+ "grad_norm": 1.850261926651001,
235
+ "learning_rate": 4.9999999999999996e-05,
236
+ "loss": 0.432,
237
+ "step": 1200
238
+ },
239
+ {
240
+ "epoch": 17.0,
241
+ "eval_accuracy": 0.8275261324041812,
242
+ "eval_loss": 0.4991794228553772,
243
+ "eval_runtime": 4.5987,
244
+ "eval_samples_per_second": 124.818,
245
+ "eval_steps_per_second": 15.657,
246
+ "step": 1224
247
+ },
248
+ {
249
+ "epoch": 18.0,
250
+ "eval_accuracy": 0.8344947735191638,
251
+ "eval_loss": 0.4799434542655945,
252
+ "eval_runtime": 4.621,
253
+ "eval_samples_per_second": 124.216,
254
+ "eval_steps_per_second": 15.581,
255
+ "step": 1296
256
+ },
257
+ {
258
+ "epoch": 18.055555555555557,
259
+ "grad_norm": 1.6390336751937866,
260
+ "learning_rate": 2.9166666666666663e-05,
261
+ "loss": 0.4196,
262
+ "step": 1300
263
+ },
264
+ {
265
+ "epoch": 19.0,
266
+ "eval_accuracy": 0.8310104529616724,
267
+ "eval_loss": 0.4837837815284729,
268
+ "eval_runtime": 4.5576,
269
+ "eval_samples_per_second": 125.943,
270
+ "eval_steps_per_second": 15.798,
271
+ "step": 1368
272
+ },
273
+ {
274
+ "epoch": 19.444444444444443,
275
+ "grad_norm": 3.292024612426758,
276
+ "learning_rate": 8.333333333333332e-06,
277
+ "loss": 0.4287,
278
+ "step": 1400
279
+ },
280
+ {
281
+ "epoch": 20.0,
282
+ "eval_accuracy": 0.8658536585365854,
283
+ "eval_loss": 0.4597996771335602,
284
+ "eval_runtime": 4.6098,
285
+ "eval_samples_per_second": 124.517,
286
+ "eval_steps_per_second": 15.619,
287
+ "step": 1440
288
+ },
289
+ {
290
+ "epoch": 20.0,
291
+ "step": 1440,
292
+ "total_flos": 3.558495949305938e+18,
293
+ "train_loss": 0.5529726452297634,
294
+ "train_runtime": 477.7876,
295
+ "train_samples_per_second": 96.11,
296
+ "train_steps_per_second": 3.014
297
  }
298
  ],
299
  "logging_steps": 100,
300
+ "max_steps": 1440,
301
  "num_input_tokens_seen": 0,
302
+ "num_train_epochs": 20,
303
  "save_steps": 500,
304
  "stateful_callbacks": {
305
  "TrainerControl": {
 
313
  "attributes": {}
314
  }
315
  },
316
+ "total_flos": 3.558495949305938e+18,
317
  "train_batch_size": 32,
318
  "trial_name": null,
319
  "trial_params": null