heado commited on
Commit
7a855f7
1 Parent(s): 117b6e2
README.md CHANGED
@@ -3,6 +3,7 @@ license: apache-2.0
3
  base_model: google/vit-base-patch16-224-in21k
4
  tags:
5
  - image-classification
 
6
  - generated_from_trainer
7
  metrics:
8
  - accuracy
@@ -18,8 +19,8 @@ should probably proofread and complete it, then remove this comment. -->
18
 
19
  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.
20
  It achieves the following results on the evaluation set:
21
- - Loss: 0.0377
22
- - Accuracy: 0.9925
23
 
24
  ## Model description
25
 
@@ -51,8 +52,8 @@ The following hyperparameters were used during training:
51
 
52
  | Training Loss | Epoch | Step | Validation Loss | Accuracy |
53
  |:-------------:|:------:|:----:|:---------------:|:--------:|
54
- | 0.1354 | 1.5385 | 100 | 0.2087 | 0.9098 |
55
- | 0.0389 | 3.0769 | 200 | 0.0377 | 0.9925 |
56
 
57
 
58
  ### Framework versions
 
3
  base_model: google/vit-base-patch16-224-in21k
4
  tags:
5
  - image-classification
6
+ - ViT
7
  - generated_from_trainer
8
  metrics:
9
  - accuracy
 
19
 
20
  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.
21
  It achieves the following results on the evaluation set:
22
+ - Loss: 0.1842
23
+ - Accuracy: 0.9531
24
 
25
  ## Model description
26
 
 
52
 
53
  | Training Loss | Epoch | Step | Validation Loss | Accuracy |
54
  |:-------------:|:------:|:----:|:---------------:|:--------:|
55
+ | 0.0316 | 1.5385 | 100 | 0.0977 | 0.9774 |
56
+ | 0.0106 | 3.0769 | 200 | 0.1979 | 0.9624 |
57
 
58
 
59
  ### Framework versions
all_results.json CHANGED
@@ -1,13 +1,13 @@
1
  {
2
  "epoch": 4.0,
3
- "eval_accuracy": 0.9924812030075187,
4
- "eval_loss": 0.037701886147260666,
5
- "eval_runtime": 3.8301,
6
- "eval_samples_per_second": 34.725,
7
- "eval_steps_per_second": 4.438,
8
  "total_flos": 3.205097416476426e+17,
9
- "train_loss": 0.11890983564349321,
10
- "train_runtime": 97.8669,
11
- "train_samples_per_second": 42.261,
12
- "train_steps_per_second": 2.657
13
  }
 
1
  {
2
  "epoch": 4.0,
3
+ "eval_accuracy": 0.953125,
4
+ "eval_loss": 0.1842205822467804,
5
+ "eval_runtime": 1.4634,
6
+ "eval_samples_per_second": 87.465,
7
+ "eval_steps_per_second": 10.933,
8
  "total_flos": 3.205097416476426e+17,
9
+ "train_loss": 0.02204044573009014,
10
+ "train_runtime": 91.5843,
11
+ "train_samples_per_second": 45.161,
12
+ "train_steps_per_second": 2.839
13
  }
model.safetensors CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:576384d6255228702fc2b93d17baff22c0691f39524086047fb19b3ad7f106c6
3
  size 343227052
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e5443676f9f75c55203d1d8085f08d7be4c158d489cce154442d42d958a547b8
3
  size 343227052
runs/Jul04_01-50-15_20f4ee5cd7bf/events.out.tfevents.1720059209.20f4ee5cd7bf.3737.0 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:55bbc6310d9e39a5bfb276ebb8f5860e978a2fb95c7a2e5df3e5924aae948aea
3
+ size 11323
runs/Jul04_01-50-15_20f4ee5cd7bf/events.out.tfevents.1720059562.20f4ee5cd7bf.3737.1 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:33a88e3ebf177fc7eefb2d9efff7375ea1dd9aaf0ea3e5e6027998b31a70e722
3
+ size 11417
runs/Jul04_01-50-15_20f4ee5cd7bf/events.out.tfevents.1720059997.20f4ee5cd7bf.3737.2 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:bbfd11b9b4d8abe85c452faa5493baea3757dd55b9d8a8039dfa97bd0ef7da44
3
+ size 411
test_results.json ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "epoch": 4.0,
3
+ "eval_accuracy": 0.953125,
4
+ "eval_loss": 0.1842205822467804,
5
+ "eval_runtime": 1.4634,
6
+ "eval_samples_per_second": 87.465,
7
+ "eval_steps_per_second": 10.933
8
+ }
train_results.json CHANGED
@@ -1,8 +1,8 @@
1
  {
2
  "epoch": 4.0,
3
  "total_flos": 3.205097416476426e+17,
4
- "train_loss": 0.11890983564349321,
5
- "train_runtime": 97.8669,
6
- "train_samples_per_second": 42.261,
7
- "train_steps_per_second": 2.657
8
  }
 
1
  {
2
  "epoch": 4.0,
3
  "total_flos": 3.205097416476426e+17,
4
+ "train_loss": 0.02204044573009014,
5
+ "train_runtime": 91.5843,
6
+ "train_samples_per_second": 45.161,
7
+ "train_steps_per_second": 2.839
8
  }
trainer_state.json CHANGED
@@ -1,6 +1,6 @@
1
  {
2
- "best_metric": 0.037701886147260666,
3
- "best_model_checkpoint": "./vit-base-beans-demo-v5/checkpoint-200",
4
  "epoch": 4.0,
5
  "eval_steps": 100,
6
  "global_step": 260,
@@ -10,212 +10,212 @@
10
  "log_history": [
11
  {
12
  "epoch": 0.15384615384615385,
13
- "grad_norm": 1.473002552986145,
14
  "learning_rate": 0.00019230769230769233,
15
- "loss": 0.8228,
16
  "step": 10
17
  },
18
  {
19
  "epoch": 0.3076923076923077,
20
- "grad_norm": 1.797827124595642,
21
  "learning_rate": 0.00018461538461538463,
22
- "loss": 0.357,
23
  "step": 20
24
  },
25
  {
26
  "epoch": 0.46153846153846156,
27
- "grad_norm": 2.562692880630493,
28
  "learning_rate": 0.00017692307692307693,
29
- "loss": 0.2274,
30
  "step": 30
31
  },
32
  {
33
  "epoch": 0.6153846153846154,
34
- "grad_norm": 1.5373003482818604,
35
  "learning_rate": 0.00016923076923076923,
36
- "loss": 0.1787,
37
  "step": 40
38
  },
39
  {
40
  "epoch": 0.7692307692307693,
41
- "grad_norm": 2.497523307800293,
42
  "learning_rate": 0.00016153846153846155,
43
- "loss": 0.2233,
44
  "step": 50
45
  },
46
  {
47
  "epoch": 0.9230769230769231,
48
- "grad_norm": 2.7328505516052246,
49
  "learning_rate": 0.00015384615384615385,
50
- "loss": 0.26,
51
  "step": 60
52
  },
53
  {
54
  "epoch": 1.0769230769230769,
55
- "grad_norm": 1.830623984336853,
56
  "learning_rate": 0.00014615384615384615,
57
- "loss": 0.1442,
58
  "step": 70
59
  },
60
  {
61
  "epoch": 1.2307692307692308,
62
- "grad_norm": 0.41552042961120605,
63
  "learning_rate": 0.00013846153846153847,
64
- "loss": 0.0919,
65
  "step": 80
66
  },
67
  {
68
  "epoch": 1.3846153846153846,
69
- "grad_norm": 0.18147416412830353,
70
  "learning_rate": 0.00013076923076923077,
71
- "loss": 0.1297,
72
  "step": 90
73
  },
74
  {
75
  "epoch": 1.5384615384615383,
76
- "grad_norm": 1.4338873624801636,
77
  "learning_rate": 0.0001230769230769231,
78
- "loss": 0.1354,
79
  "step": 100
80
  },
81
  {
82
  "epoch": 1.5384615384615383,
83
- "eval_accuracy": 0.9097744360902256,
84
- "eval_loss": 0.20873208343982697,
85
- "eval_runtime": 1.9944,
86
- "eval_samples_per_second": 66.687,
87
- "eval_steps_per_second": 8.524,
88
  "step": 100
89
  },
90
  {
91
  "epoch": 1.6923076923076923,
92
- "grad_norm": 0.26245740056037903,
93
  "learning_rate": 0.00011538461538461538,
94
- "loss": 0.106,
95
  "step": 110
96
  },
97
  {
98
  "epoch": 1.8461538461538463,
99
- "grad_norm": 0.13711966574192047,
100
  "learning_rate": 0.0001076923076923077,
101
- "loss": 0.1161,
102
  "step": 120
103
  },
104
  {
105
  "epoch": 2.0,
106
- "grad_norm": 0.6398559212684631,
107
  "learning_rate": 0.0001,
108
- "loss": 0.0433,
109
  "step": 130
110
  },
111
  {
112
  "epoch": 2.1538461538461537,
113
- "grad_norm": 0.13836634159088135,
114
  "learning_rate": 9.230769230769232e-05,
115
- "loss": 0.0412,
116
  "step": 140
117
  },
118
  {
119
  "epoch": 2.3076923076923075,
120
- "grad_norm": 2.5153419971466064,
121
  "learning_rate": 8.461538461538461e-05,
122
- "loss": 0.0231,
123
  "step": 150
124
  },
125
  {
126
  "epoch": 2.4615384615384617,
127
- "grad_norm": 0.08133295178413391,
128
  "learning_rate": 7.692307692307693e-05,
129
- "loss": 0.0166,
130
  "step": 160
131
  },
132
  {
133
  "epoch": 2.6153846153846154,
134
- "grad_norm": 0.07401230931282043,
135
  "learning_rate": 6.923076923076924e-05,
136
- "loss": 0.0167,
137
  "step": 170
138
  },
139
  {
140
  "epoch": 2.769230769230769,
141
- "grad_norm": 0.8673214316368103,
142
  "learning_rate": 6.153846153846155e-05,
143
- "loss": 0.0149,
144
  "step": 180
145
  },
146
  {
147
  "epoch": 2.9230769230769234,
148
- "grad_norm": 0.06832073628902435,
149
  "learning_rate": 5.384615384615385e-05,
150
- "loss": 0.0337,
151
  "step": 190
152
  },
153
  {
154
  "epoch": 3.076923076923077,
155
- "grad_norm": 0.06998351216316223,
156
  "learning_rate": 4.615384615384616e-05,
157
- "loss": 0.0389,
158
  "step": 200
159
  },
160
  {
161
  "epoch": 3.076923076923077,
162
- "eval_accuracy": 0.9924812030075187,
163
- "eval_loss": 0.037701886147260666,
164
- "eval_runtime": 1.2077,
165
- "eval_samples_per_second": 110.122,
166
- "eval_steps_per_second": 14.076,
167
  "step": 200
168
  },
169
  {
170
  "epoch": 3.230769230769231,
171
- "grad_norm": 0.061544470489025116,
172
  "learning_rate": 3.846153846153846e-05,
173
- "loss": 0.0122,
174
  "step": 210
175
  },
176
  {
177
  "epoch": 3.3846153846153846,
178
- "grad_norm": 0.06420169025659561,
179
  "learning_rate": 3.0769230769230774e-05,
180
- "loss": 0.0125,
181
  "step": 220
182
  },
183
  {
184
  "epoch": 3.5384615384615383,
185
- "grad_norm": 0.06388475000858307,
186
  "learning_rate": 2.307692307692308e-05,
187
- "loss": 0.0117,
188
  "step": 230
189
  },
190
  {
191
  "epoch": 3.6923076923076925,
192
- "grad_norm": 0.06183198094367981,
193
  "learning_rate": 1.5384615384615387e-05,
194
- "loss": 0.0113,
195
  "step": 240
196
  },
197
  {
198
  "epoch": 3.8461538461538463,
199
- "grad_norm": 0.05793595686554909,
200
  "learning_rate": 7.692307692307694e-06,
201
- "loss": 0.0114,
202
  "step": 250
203
  },
204
  {
205
  "epoch": 4.0,
206
- "grad_norm": 0.056076530367136,
207
  "learning_rate": 0.0,
208
- "loss": 0.0116,
209
  "step": 260
210
  },
211
  {
212
  "epoch": 4.0,
213
  "step": 260,
214
  "total_flos": 3.205097416476426e+17,
215
- "train_loss": 0.11890983564349321,
216
- "train_runtime": 97.8669,
217
- "train_samples_per_second": 42.261,
218
- "train_steps_per_second": 2.657
219
  }
220
  ],
221
  "logging_steps": 10,
 
1
  {
2
+ "best_metric": 0.09767168015241623,
3
+ "best_model_checkpoint": "./vit-base-beans-demo-v5/checkpoint-100",
4
  "epoch": 4.0,
5
  "eval_steps": 100,
6
  "global_step": 260,
 
10
  "log_history": [
11
  {
12
  "epoch": 0.15384615384615385,
13
+ "grad_norm": 0.0549064539372921,
14
  "learning_rate": 0.00019230769230769233,
15
+ "loss": 0.011,
16
  "step": 10
17
  },
18
  {
19
  "epoch": 0.3076923076923077,
20
+ "grad_norm": 0.053657062351703644,
21
  "learning_rate": 0.00018461538461538463,
22
+ "loss": 0.0099,
23
  "step": 20
24
  },
25
  {
26
  "epoch": 0.46153846153846156,
27
+ "grad_norm": 0.04586618021130562,
28
  "learning_rate": 0.00017692307692307693,
29
+ "loss": 0.0085,
30
  "step": 30
31
  },
32
  {
33
  "epoch": 0.6153846153846154,
34
+ "grad_norm": 0.03834086284041405,
35
  "learning_rate": 0.00016923076923076923,
36
+ "loss": 0.0074,
37
  "step": 40
38
  },
39
  {
40
  "epoch": 0.7692307692307693,
41
+ "grad_norm": 0.0455704927444458,
42
  "learning_rate": 0.00016153846153846155,
43
+ "loss": 0.0081,
44
  "step": 50
45
  },
46
  {
47
  "epoch": 0.9230769230769231,
48
+ "grad_norm": 4.641096591949463,
49
  "learning_rate": 0.00015384615384615385,
50
+ "loss": 0.0547,
51
  "step": 60
52
  },
53
  {
54
  "epoch": 1.0769230769230769,
55
+ "grad_norm": 10.7581205368042,
56
  "learning_rate": 0.00014615384615384615,
57
+ "loss": 0.028,
58
  "step": 70
59
  },
60
  {
61
  "epoch": 1.2307692307692308,
62
+ "grad_norm": 0.04066062346100807,
63
  "learning_rate": 0.00013846153846153847,
64
+ "loss": 0.0387,
65
  "step": 80
66
  },
67
  {
68
  "epoch": 1.3846153846153846,
69
+ "grad_norm": 0.042889270931482315,
70
  "learning_rate": 0.00013076923076923077,
71
+ "loss": 0.0808,
72
  "step": 90
73
  },
74
  {
75
  "epoch": 1.5384615384615383,
76
+ "grad_norm": 0.039594896137714386,
77
  "learning_rate": 0.0001230769230769231,
78
+ "loss": 0.0316,
79
  "step": 100
80
  },
81
  {
82
  "epoch": 1.5384615384615383,
83
+ "eval_accuracy": 0.9774436090225563,
84
+ "eval_loss": 0.09767168015241623,
85
+ "eval_runtime": 1.2787,
86
+ "eval_samples_per_second": 104.015,
87
+ "eval_steps_per_second": 13.295,
88
  "step": 100
89
  },
90
  {
91
  "epoch": 1.6923076923076923,
92
+ "grad_norm": 0.4228585660457611,
93
  "learning_rate": 0.00011538461538461538,
94
+ "loss": 0.0357,
95
  "step": 110
96
  },
97
  {
98
  "epoch": 1.8461538461538463,
99
+ "grad_norm": 0.03368207439780235,
100
  "learning_rate": 0.0001076923076923077,
101
+ "loss": 0.0721,
102
  "step": 120
103
  },
104
  {
105
  "epoch": 2.0,
106
+ "grad_norm": 0.041465017944574356,
107
  "learning_rate": 0.0001,
108
+ "loss": 0.0286,
109
  "step": 130
110
  },
111
  {
112
  "epoch": 2.1538461538461537,
113
+ "grad_norm": 4.102177619934082,
114
  "learning_rate": 9.230769230769232e-05,
115
+ "loss": 0.0239,
116
  "step": 140
117
  },
118
  {
119
  "epoch": 2.3076923076923075,
120
+ "grad_norm": 1.726514458656311,
121
  "learning_rate": 8.461538461538461e-05,
122
+ "loss": 0.0085,
123
  "step": 150
124
  },
125
  {
126
  "epoch": 2.4615384615384617,
127
+ "grad_norm": 0.025889277458190918,
128
  "learning_rate": 7.692307692307693e-05,
129
+ "loss": 0.0052,
130
  "step": 160
131
  },
132
  {
133
  "epoch": 2.6153846153846154,
134
+ "grad_norm": 0.025063877925276756,
135
  "learning_rate": 6.923076923076924e-05,
136
+ "loss": 0.0046,
137
  "step": 170
138
  },
139
  {
140
  "epoch": 2.769230769230769,
141
+ "grad_norm": 0.024265997111797333,
142
  "learning_rate": 6.153846153846155e-05,
143
+ "loss": 0.0046,
144
  "step": 180
145
  },
146
  {
147
  "epoch": 2.9230769230769234,
148
+ "grad_norm": 15.569941520690918,
149
  "learning_rate": 5.384615384615385e-05,
150
+ "loss": 0.0232,
151
  "step": 190
152
  },
153
  {
154
  "epoch": 3.076923076923077,
155
+ "grad_norm": 0.023741118609905243,
156
  "learning_rate": 4.615384615384616e-05,
157
+ "loss": 0.0106,
158
  "step": 200
159
  },
160
  {
161
  "epoch": 3.076923076923077,
162
+ "eval_accuracy": 0.9624060150375939,
163
+ "eval_loss": 0.19794000685214996,
164
+ "eval_runtime": 1.6975,
165
+ "eval_samples_per_second": 78.351,
166
+ "eval_steps_per_second": 10.015,
167
  "step": 200
168
  },
169
  {
170
  "epoch": 3.230769230769231,
171
+ "grad_norm": 0.03866928815841675,
172
  "learning_rate": 3.846153846153846e-05,
173
+ "loss": 0.0377,
174
  "step": 210
175
  },
176
  {
177
  "epoch": 3.3846153846153846,
178
+ "grad_norm": 0.023310711607336998,
179
  "learning_rate": 3.0769230769230774e-05,
180
+ "loss": 0.0221,
181
  "step": 220
182
  },
183
  {
184
  "epoch": 3.5384615384615383,
185
+ "grad_norm": 0.02209044247865677,
186
  "learning_rate": 2.307692307692308e-05,
187
+ "loss": 0.0057,
188
  "step": 230
189
  },
190
  {
191
  "epoch": 3.6923076923076925,
192
+ "grad_norm": 0.020965544506907463,
193
  "learning_rate": 1.5384615384615387e-05,
194
+ "loss": 0.004,
195
  "step": 240
196
  },
197
  {
198
  "epoch": 3.8461538461538463,
199
+ "grad_norm": 0.02124304138123989,
200
  "learning_rate": 7.692307692307694e-06,
201
+ "loss": 0.0039,
202
  "step": 250
203
  },
204
  {
205
  "epoch": 4.0,
206
+ "grad_norm": 0.0217234306037426,
207
  "learning_rate": 0.0,
208
+ "loss": 0.0039,
209
  "step": 260
210
  },
211
  {
212
  "epoch": 4.0,
213
  "step": 260,
214
  "total_flos": 3.205097416476426e+17,
215
+ "train_loss": 0.02204044573009014,
216
+ "train_runtime": 91.5843,
217
+ "train_samples_per_second": 45.161,
218
+ "train_steps_per_second": 2.839
219
  }
220
  ],
221
  "logging_steps": 10,
training_args.bin CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:5020becdec1b9528f546f5b3874db748b6fb45822f70f644c839d27e503bab49
3
  size 5112
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:44164b4d4762f13debd0722ab6612948375146c034c87f96580824bc81c4f4c8
3
  size 5112