End of training
Browse files- README.md +191 -0
- config.json +303 -0
- config.toml +27 -0
- model.safetensors +3 -0
- preprocessor_config.json +36 -0
- train.ipynb +0 -0
- training_args.bin +3 -0
README.md
ADDED
@@ -0,0 +1,191 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: apache-2.0
|
3 |
+
base_model: microsoft/swinv2-base-patch4-window16-256
|
4 |
+
tags:
|
5 |
+
- generated_from_trainer
|
6 |
+
datasets:
|
7 |
+
- stanford-dogs
|
8 |
+
metrics:
|
9 |
+
- accuracy
|
10 |
+
- f1
|
11 |
+
- precision
|
12 |
+
- recall
|
13 |
+
model-index:
|
14 |
+
- name: microsoft-swinv2-base-patch4-window16-256-batch32-lr5e-05-standford-dogs
|
15 |
+
results:
|
16 |
+
- task:
|
17 |
+
name: Image Classification
|
18 |
+
type: image-classification
|
19 |
+
dataset:
|
20 |
+
name: stanford-dogs
|
21 |
+
type: stanford-dogs
|
22 |
+
config: default
|
23 |
+
split: full
|
24 |
+
args: default
|
25 |
+
metrics:
|
26 |
+
- name: Accuracy
|
27 |
+
type: accuracy
|
28 |
+
value: 0.9467930029154519
|
29 |
+
- name: F1
|
30 |
+
type: f1
|
31 |
+
value: 0.9450299849824627
|
32 |
+
- name: Precision
|
33 |
+
type: precision
|
34 |
+
value: 0.9479779072439513
|
35 |
+
- name: Recall
|
36 |
+
type: recall
|
37 |
+
value: 0.9453246844288115
|
38 |
+
---
|
39 |
+
|
40 |
+
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
41 |
+
should probably proofread and complete it, then remove this comment. -->
|
42 |
+
|
43 |
+
# microsoft-swinv2-base-patch4-window16-256-batch32-lr5e-05-standford-dogs
|
44 |
+
|
45 |
+
This model is a fine-tuned version of [microsoft/swinv2-base-patch4-window16-256](https://huggingface.co/microsoft/swinv2-base-patch4-window16-256) on the stanford-dogs dataset.
|
46 |
+
It achieves the following results on the evaluation set:
|
47 |
+
- Loss: 0.1856
|
48 |
+
- Accuracy: 0.9468
|
49 |
+
- F1: 0.9450
|
50 |
+
- Precision: 0.9480
|
51 |
+
- Recall: 0.9453
|
52 |
+
|
53 |
+
## Model description
|
54 |
+
|
55 |
+
More information needed
|
56 |
+
|
57 |
+
## Intended uses & limitations
|
58 |
+
|
59 |
+
More information needed
|
60 |
+
|
61 |
+
## Training and evaluation data
|
62 |
+
|
63 |
+
More information needed
|
64 |
+
|
65 |
+
## Training procedure
|
66 |
+
|
67 |
+
### Training hyperparameters
|
68 |
+
|
69 |
+
The following hyperparameters were used during training:
|
70 |
+
- learning_rate: 5e-05
|
71 |
+
- train_batch_size: 32
|
72 |
+
- eval_batch_size: 32
|
73 |
+
- seed: 42
|
74 |
+
- gradient_accumulation_steps: 4
|
75 |
+
- total_train_batch_size: 128
|
76 |
+
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
|
77 |
+
- lr_scheduler_type: linear
|
78 |
+
- training_steps: 1000
|
79 |
+
|
80 |
+
### Training results
|
81 |
+
|
82 |
+
| Training Loss | Epoch | Step | Validation Loss | Accuracy | F1 | Precision | Recall |
|
83 |
+
|:-------------:|:------:|:----:|:---------------:|:--------:|:------:|:---------:|:------:|
|
84 |
+
| 4.7437 | 0.0777 | 10 | 4.6395 | 0.0862 | 0.0519 | 0.0499 | 0.0821 |
|
85 |
+
| 4.5551 | 0.1553 | 20 | 4.3696 | 0.1713 | 0.1162 | 0.1608 | 0.1573 |
|
86 |
+
| 4.2151 | 0.2330 | 30 | 3.8252 | 0.3188 | 0.2681 | 0.4133 | 0.3021 |
|
87 |
+
| 3.5619 | 0.3107 | 40 | 2.8929 | 0.6368 | 0.5785 | 0.6552 | 0.6211 |
|
88 |
+
| 2.6253 | 0.3883 | 50 | 1.8693 | 0.7850 | 0.7538 | 0.7906 | 0.7733 |
|
89 |
+
| 1.8818 | 0.4660 | 60 | 1.1203 | 0.8542 | 0.8406 | 0.8667 | 0.8468 |
|
90 |
+
| 1.3652 | 0.5437 | 70 | 0.7330 | 0.8880 | 0.8780 | 0.9039 | 0.8850 |
|
91 |
+
| 1.0456 | 0.6214 | 80 | 0.5269 | 0.9084 | 0.9015 | 0.9101 | 0.9050 |
|
92 |
+
| 0.9039 | 0.6990 | 90 | 0.4139 | 0.9181 | 0.9093 | 0.9213 | 0.9150 |
|
93 |
+
| 0.7965 | 0.7767 | 100 | 0.3441 | 0.9249 | 0.9181 | 0.9315 | 0.9221 |
|
94 |
+
| 0.7053 | 0.8544 | 110 | 0.3184 | 0.9225 | 0.9163 | 0.9320 | 0.9208 |
|
95 |
+
| 0.6907 | 0.9320 | 120 | 0.2870 | 0.9283 | 0.9261 | 0.9324 | 0.9270 |
|
96 |
+
| 0.6293 | 1.0097 | 130 | 0.2760 | 0.9276 | 0.9245 | 0.9329 | 0.9260 |
|
97 |
+
| 0.5564 | 1.0874 | 140 | 0.2517 | 0.9339 | 0.9308 | 0.9362 | 0.9320 |
|
98 |
+
| 0.5902 | 1.1650 | 150 | 0.2500 | 0.9351 | 0.9308 | 0.9371 | 0.9328 |
|
99 |
+
| 0.5269 | 1.2427 | 160 | 0.2429 | 0.9334 | 0.9307 | 0.9370 | 0.9317 |
|
100 |
+
| 0.5148 | 1.3204 | 170 | 0.2358 | 0.9393 | 0.9368 | 0.9407 | 0.9373 |
|
101 |
+
| 0.4998 | 1.3981 | 180 | 0.2451 | 0.9310 | 0.9270 | 0.9357 | 0.9283 |
|
102 |
+
| 0.4797 | 1.4757 | 190 | 0.2425 | 0.9325 | 0.9287 | 0.9377 | 0.9315 |
|
103 |
+
| 0.4933 | 1.5534 | 200 | 0.2360 | 0.9281 | 0.9257 | 0.9333 | 0.9266 |
|
104 |
+
| 0.4414 | 1.6311 | 210 | 0.2201 | 0.9371 | 0.9343 | 0.9398 | 0.9351 |
|
105 |
+
| 0.4401 | 1.7087 | 220 | 0.2248 | 0.9346 | 0.9327 | 0.9375 | 0.9337 |
|
106 |
+
| 0.4023 | 1.7864 | 230 | 0.2199 | 0.9344 | 0.9282 | 0.9381 | 0.9317 |
|
107 |
+
| 0.4723 | 1.8641 | 240 | 0.2071 | 0.9419 | 0.9389 | 0.9437 | 0.9401 |
|
108 |
+
| 0.4593 | 1.9417 | 250 | 0.2123 | 0.9402 | 0.9371 | 0.9421 | 0.9382 |
|
109 |
+
| 0.4544 | 2.0194 | 260 | 0.2191 | 0.9385 | 0.9347 | 0.9396 | 0.9371 |
|
110 |
+
| 0.3871 | 2.0971 | 270 | 0.2158 | 0.9395 | 0.9372 | 0.9401 | 0.9378 |
|
111 |
+
| 0.4162 | 2.1748 | 280 | 0.2073 | 0.9385 | 0.9353 | 0.9396 | 0.9364 |
|
112 |
+
| 0.3774 | 2.2524 | 290 | 0.1981 | 0.9397 | 0.9387 | 0.9422 | 0.9387 |
|
113 |
+
| 0.3895 | 2.3301 | 300 | 0.2008 | 0.9400 | 0.9361 | 0.9395 | 0.9376 |
|
114 |
+
| 0.3804 | 2.4078 | 310 | 0.2018 | 0.9431 | 0.9396 | 0.9443 | 0.9412 |
|
115 |
+
| 0.3783 | 2.4854 | 320 | 0.2038 | 0.9422 | 0.9384 | 0.9439 | 0.9403 |
|
116 |
+
| 0.4376 | 2.5631 | 330 | 0.1968 | 0.9419 | 0.9404 | 0.9459 | 0.9414 |
|
117 |
+
| 0.3696 | 2.6408 | 340 | 0.2011 | 0.9441 | 0.9422 | 0.9464 | 0.9430 |
|
118 |
+
| 0.3954 | 2.7184 | 350 | 0.1997 | 0.9417 | 0.9379 | 0.9430 | 0.9399 |
|
119 |
+
| 0.3651 | 2.7961 | 360 | 0.1952 | 0.9434 | 0.9392 | 0.9407 | 0.9415 |
|
120 |
+
| 0.3646 | 2.8738 | 370 | 0.2045 | 0.9429 | 0.9391 | 0.9459 | 0.9413 |
|
121 |
+
| 0.3532 | 2.9515 | 380 | 0.1991 | 0.9427 | 0.9394 | 0.9455 | 0.9413 |
|
122 |
+
| 0.342 | 3.0291 | 390 | 0.1958 | 0.9410 | 0.9399 | 0.9441 | 0.9404 |
|
123 |
+
| 0.3706 | 3.1068 | 400 | 0.2010 | 0.9419 | 0.9401 | 0.9442 | 0.9406 |
|
124 |
+
| 0.3031 | 3.1845 | 410 | 0.2013 | 0.9424 | 0.9407 | 0.9449 | 0.9410 |
|
125 |
+
| 0.3345 | 3.2621 | 420 | 0.2022 | 0.9414 | 0.9399 | 0.9438 | 0.9406 |
|
126 |
+
| 0.3356 | 3.3398 | 430 | 0.1927 | 0.9470 | 0.9451 | 0.9500 | 0.9453 |
|
127 |
+
| 0.3538 | 3.4175 | 440 | 0.1927 | 0.9446 | 0.9422 | 0.9472 | 0.9430 |
|
128 |
+
| 0.3505 | 3.4951 | 450 | 0.1909 | 0.9480 | 0.9461 | 0.9498 | 0.9466 |
|
129 |
+
| 0.3398 | 3.5728 | 460 | 0.1917 | 0.9453 | 0.9419 | 0.9475 | 0.9436 |
|
130 |
+
| 0.3303 | 3.6505 | 470 | 0.1895 | 0.9483 | 0.9453 | 0.9506 | 0.9464 |
|
131 |
+
| 0.3685 | 3.7282 | 480 | 0.1883 | 0.9458 | 0.9442 | 0.9468 | 0.9445 |
|
132 |
+
| 0.3125 | 3.8058 | 490 | 0.1926 | 0.9441 | 0.9422 | 0.9462 | 0.9426 |
|
133 |
+
| 0.3857 | 3.8835 | 500 | 0.1911 | 0.9446 | 0.9426 | 0.9473 | 0.9430 |
|
134 |
+
| 0.3407 | 3.9612 | 510 | 0.1825 | 0.9470 | 0.9454 | 0.9486 | 0.9459 |
|
135 |
+
| 0.3545 | 4.0388 | 520 | 0.1919 | 0.9444 | 0.9428 | 0.9448 | 0.9432 |
|
136 |
+
| 0.306 | 4.1165 | 530 | 0.1901 | 0.9466 | 0.9437 | 0.9471 | 0.9450 |
|
137 |
+
| 0.2511 | 4.1942 | 540 | 0.2026 | 0.9431 | 0.9388 | 0.9448 | 0.9410 |
|
138 |
+
| 0.3233 | 4.2718 | 550 | 0.1950 | 0.9453 | 0.9433 | 0.9470 | 0.9438 |
|
139 |
+
| 0.2793 | 4.3495 | 560 | 0.1973 | 0.9453 | 0.9437 | 0.9466 | 0.9444 |
|
140 |
+
| 0.3035 | 4.4272 | 570 | 0.1944 | 0.9470 | 0.9454 | 0.9491 | 0.9459 |
|
141 |
+
| 0.2776 | 4.5049 | 580 | 0.2030 | 0.9412 | 0.9393 | 0.9445 | 0.9398 |
|
142 |
+
| 0.3204 | 4.5825 | 590 | 0.1959 | 0.9441 | 0.9417 | 0.9468 | 0.9428 |
|
143 |
+
| 0.2868 | 4.6602 | 600 | 0.1959 | 0.9429 | 0.9413 | 0.9437 | 0.9414 |
|
144 |
+
| 0.3325 | 4.7379 | 610 | 0.1991 | 0.9414 | 0.9389 | 0.9435 | 0.9401 |
|
145 |
+
| 0.3255 | 4.8155 | 620 | 0.1894 | 0.9441 | 0.9425 | 0.9448 | 0.9431 |
|
146 |
+
| 0.2744 | 4.8932 | 630 | 0.1915 | 0.9434 | 0.9411 | 0.9434 | 0.9421 |
|
147 |
+
| 0.2945 | 4.9709 | 640 | 0.1932 | 0.9453 | 0.9415 | 0.9468 | 0.9436 |
|
148 |
+
| 0.253 | 5.0485 | 650 | 0.1928 | 0.9448 | 0.9423 | 0.9465 | 0.9435 |
|
149 |
+
| 0.2614 | 5.1262 | 660 | 0.1942 | 0.9451 | 0.9441 | 0.9478 | 0.9444 |
|
150 |
+
| 0.2699 | 5.2039 | 670 | 0.1924 | 0.9468 | 0.9433 | 0.9479 | 0.9451 |
|
151 |
+
| 0.2839 | 5.2816 | 680 | 0.1894 | 0.9461 | 0.9442 | 0.9475 | 0.9447 |
|
152 |
+
| 0.2353 | 5.3592 | 690 | 0.1947 | 0.9427 | 0.9407 | 0.9435 | 0.9410 |
|
153 |
+
| 0.2627 | 5.4369 | 700 | 0.1964 | 0.9419 | 0.9405 | 0.9440 | 0.9409 |
|
154 |
+
| 0.2592 | 5.5146 | 710 | 0.1893 | 0.9456 | 0.9440 | 0.9468 | 0.9441 |
|
155 |
+
| 0.2634 | 5.5922 | 720 | 0.1918 | 0.9458 | 0.9431 | 0.9473 | 0.9443 |
|
156 |
+
| 0.294 | 5.6699 | 730 | 0.1922 | 0.9446 | 0.9417 | 0.9457 | 0.9428 |
|
157 |
+
| 0.2565 | 5.7476 | 740 | 0.1907 | 0.9456 | 0.9432 | 0.9469 | 0.9439 |
|
158 |
+
| 0.2657 | 5.8252 | 750 | 0.1902 | 0.9453 | 0.9415 | 0.9464 | 0.9434 |
|
159 |
+
| 0.2945 | 5.9029 | 760 | 0.1872 | 0.9453 | 0.9427 | 0.9457 | 0.9439 |
|
160 |
+
| 0.2758 | 5.9806 | 770 | 0.1855 | 0.9444 | 0.9432 | 0.9460 | 0.9430 |
|
161 |
+
| 0.226 | 6.0583 | 780 | 0.1867 | 0.9470 | 0.9456 | 0.9488 | 0.9457 |
|
162 |
+
| 0.2105 | 6.1359 | 790 | 0.1866 | 0.9470 | 0.9446 | 0.9482 | 0.9451 |
|
163 |
+
| 0.2524 | 6.2136 | 800 | 0.1891 | 0.9456 | 0.9441 | 0.9470 | 0.9441 |
|
164 |
+
| 0.2987 | 6.2913 | 810 | 0.1879 | 0.9463 | 0.9442 | 0.9472 | 0.9447 |
|
165 |
+
| 0.2393 | 6.3689 | 820 | 0.1876 | 0.9456 | 0.9439 | 0.9467 | 0.9442 |
|
166 |
+
| 0.2779 | 6.4466 | 830 | 0.1870 | 0.9473 | 0.9460 | 0.9486 | 0.9463 |
|
167 |
+
| 0.3117 | 6.5243 | 840 | 0.1866 | 0.9470 | 0.9450 | 0.9483 | 0.9455 |
|
168 |
+
| 0.2574 | 6.6019 | 850 | 0.1853 | 0.9468 | 0.9449 | 0.9481 | 0.9454 |
|
169 |
+
| 0.2307 | 6.6796 | 860 | 0.1886 | 0.9463 | 0.9441 | 0.9475 | 0.9447 |
|
170 |
+
| 0.2771 | 6.7573 | 870 | 0.1878 | 0.9456 | 0.9437 | 0.9464 | 0.9440 |
|
171 |
+
| 0.2575 | 6.8350 | 880 | 0.1868 | 0.9458 | 0.9440 | 0.9465 | 0.9443 |
|
172 |
+
| 0.2422 | 6.9126 | 890 | 0.1857 | 0.9463 | 0.9447 | 0.9466 | 0.9448 |
|
173 |
+
| 0.2564 | 6.9903 | 900 | 0.1861 | 0.9451 | 0.9434 | 0.9458 | 0.9437 |
|
174 |
+
| 0.222 | 7.0680 | 910 | 0.1866 | 0.9461 | 0.9442 | 0.9471 | 0.9445 |
|
175 |
+
| 0.2467 | 7.1456 | 920 | 0.1862 | 0.9456 | 0.9438 | 0.9464 | 0.9441 |
|
176 |
+
| 0.2412 | 7.2233 | 930 | 0.1860 | 0.9463 | 0.9449 | 0.9474 | 0.9451 |
|
177 |
+
| 0.2518 | 7.3010 | 940 | 0.1857 | 0.9458 | 0.9442 | 0.9466 | 0.9445 |
|
178 |
+
| 0.2811 | 7.3786 | 950 | 0.1857 | 0.9463 | 0.9446 | 0.9472 | 0.9448 |
|
179 |
+
| 0.2255 | 7.4563 | 960 | 0.1856 | 0.9468 | 0.9451 | 0.9477 | 0.9453 |
|
180 |
+
| 0.2425 | 7.5340 | 970 | 0.1857 | 0.9466 | 0.9449 | 0.9478 | 0.9451 |
|
181 |
+
| 0.2352 | 7.6117 | 980 | 0.1856 | 0.9468 | 0.9450 | 0.9480 | 0.9453 |
|
182 |
+
| 0.2328 | 7.6893 | 990 | 0.1855 | 0.9468 | 0.9450 | 0.9480 | 0.9453 |
|
183 |
+
| 0.2353 | 7.7670 | 1000 | 0.1856 | 0.9468 | 0.9450 | 0.9480 | 0.9453 |
|
184 |
+
|
185 |
+
|
186 |
+
### Framework versions
|
187 |
+
|
188 |
+
- Transformers 4.40.2
|
189 |
+
- Pytorch 2.3.0
|
190 |
+
- Datasets 2.19.1
|
191 |
+
- Tokenizers 0.19.1
|
config.json
ADDED
@@ -0,0 +1,303 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_name_or_path": "microsoft/swinv2-base-patch4-window16-256",
|
3 |
+
"architectures": [
|
4 |
+
"Swinv2ForImageClassification"
|
5 |
+
],
|
6 |
+
"attention_probs_dropout_prob": 0.0,
|
7 |
+
"depths": [
|
8 |
+
2,
|
9 |
+
2,
|
10 |
+
18,
|
11 |
+
2
|
12 |
+
],
|
13 |
+
"drop_path_rate": 0.1,
|
14 |
+
"embed_dim": 128,
|
15 |
+
"encoder_stride": 32,
|
16 |
+
"hidden_act": "gelu",
|
17 |
+
"hidden_dropout_prob": 0.0,
|
18 |
+
"hidden_size": 1024,
|
19 |
+
"id2label": {
|
20 |
+
"0": "Affenpinscher",
|
21 |
+
"1": "Afghan Hound",
|
22 |
+
"2": "African Hunting Dog",
|
23 |
+
"3": "Airedale",
|
24 |
+
"4": "American Staffordshire Terrier",
|
25 |
+
"5": "Appenzeller",
|
26 |
+
"6": "Australian Terrier",
|
27 |
+
"7": "Basenji",
|
28 |
+
"8": "Basset",
|
29 |
+
"9": "Beagle",
|
30 |
+
"10": "Bedlington Terrier",
|
31 |
+
"11": "Bernese Mountain Dog",
|
32 |
+
"12": "Black And Tan Coonhound",
|
33 |
+
"13": "Blenheim Spaniel",
|
34 |
+
"14": "Bloodhound",
|
35 |
+
"15": "Bluetick",
|
36 |
+
"16": "Border Collie",
|
37 |
+
"17": "Border Terrier",
|
38 |
+
"18": "Borzoi",
|
39 |
+
"19": "Boston Bull",
|
40 |
+
"20": "Bouvier Des Flandres",
|
41 |
+
"21": "Boxer",
|
42 |
+
"22": "Brabancon Griffon",
|
43 |
+
"23": "Briard",
|
44 |
+
"24": "Brittany Spaniel",
|
45 |
+
"25": "Bull Mastiff",
|
46 |
+
"26": "Cairn",
|
47 |
+
"27": "Cardigan",
|
48 |
+
"28": "Chesapeake Bay Retriever",
|
49 |
+
"29": "Chihuahua",
|
50 |
+
"30": "Chow",
|
51 |
+
"31": "Clumber",
|
52 |
+
"32": "Cocker Spaniel",
|
53 |
+
"33": "Collie",
|
54 |
+
"34": "Curly Coated Retriever",
|
55 |
+
"35": "Dandie Dinmont",
|
56 |
+
"36": "Dhole",
|
57 |
+
"37": "Dingo",
|
58 |
+
"38": "Doberman",
|
59 |
+
"39": "English Foxhound",
|
60 |
+
"40": "English Setter",
|
61 |
+
"41": "English Springer",
|
62 |
+
"42": "Entlebucher",
|
63 |
+
"43": "Eskimo Dog",
|
64 |
+
"44": "Flat Coated Retriever",
|
65 |
+
"45": "French Bulldog",
|
66 |
+
"46": "German Shepherd",
|
67 |
+
"47": "German Short Haired Pointer",
|
68 |
+
"48": "Giant Schnauzer",
|
69 |
+
"49": "Golden Retriever",
|
70 |
+
"50": "Gordon Setter",
|
71 |
+
"51": "Great Dane",
|
72 |
+
"52": "Great Pyrenees",
|
73 |
+
"53": "Greater Swiss Mountain Dog",
|
74 |
+
"54": "Groenendael",
|
75 |
+
"55": "Ibizan Hound",
|
76 |
+
"56": "Irish Setter",
|
77 |
+
"57": "Irish Terrier",
|
78 |
+
"58": "Irish Water Spaniel",
|
79 |
+
"59": "Irish Wolfhound",
|
80 |
+
"60": "Italian Greyhound",
|
81 |
+
"61": "Japanese Spaniel",
|
82 |
+
"62": "Keeshond",
|
83 |
+
"63": "Kelpie",
|
84 |
+
"64": "Kerry Blue Terrier",
|
85 |
+
"65": "Komondor",
|
86 |
+
"66": "Kuvasz",
|
87 |
+
"67": "Labrador Retriever",
|
88 |
+
"68": "Lakeland Terrier",
|
89 |
+
"69": "Leonberg",
|
90 |
+
"70": "Lhasa",
|
91 |
+
"71": "Malamute",
|
92 |
+
"72": "Malinois",
|
93 |
+
"73": "Maltese Dog",
|
94 |
+
"74": "Mexican Hairless",
|
95 |
+
"75": "Miniature Pinscher",
|
96 |
+
"76": "Miniature Poodle",
|
97 |
+
"77": "Miniature Schnauzer",
|
98 |
+
"78": "Newfoundland",
|
99 |
+
"79": "Norfolk Terrier",
|
100 |
+
"80": "Norwegian Elkhound",
|
101 |
+
"81": "Norwich Terrier",
|
102 |
+
"82": "Old English Sheepdog",
|
103 |
+
"83": "Otterhound",
|
104 |
+
"84": "Papillon",
|
105 |
+
"85": "Pekinese",
|
106 |
+
"86": "Pembroke",
|
107 |
+
"87": "Pomeranian",
|
108 |
+
"88": "Pug",
|
109 |
+
"89": "Redbone",
|
110 |
+
"90": "Rhodesian Ridgeback",
|
111 |
+
"91": "Rottweiler",
|
112 |
+
"92": "Saint Bernard",
|
113 |
+
"93": "Saluki",
|
114 |
+
"94": "Samoyed",
|
115 |
+
"95": "Schipperke",
|
116 |
+
"96": "Scotch Terrier",
|
117 |
+
"97": "Scottish Deerhound",
|
118 |
+
"98": "Sealyham Terrier",
|
119 |
+
"99": "Shetland Sheepdog",
|
120 |
+
"100": "Shih Tzu",
|
121 |
+
"101": "Siberian Husky",
|
122 |
+
"102": "Silky Terrier",
|
123 |
+
"103": "Soft Coated Wheaten Terrier",
|
124 |
+
"104": "Staffordshire Bullterrier",
|
125 |
+
"105": "Standard Poodle",
|
126 |
+
"106": "Standard Schnauzer",
|
127 |
+
"107": "Sussex Spaniel",
|
128 |
+
"108": "Tibetan Mastiff",
|
129 |
+
"109": "Tibetan Terrier",
|
130 |
+
"110": "Toy Poodle",
|
131 |
+
"111": "Toy Terrier",
|
132 |
+
"112": "Vizsla",
|
133 |
+
"113": "Walker Hound",
|
134 |
+
"114": "Weimaraner",
|
135 |
+
"115": "Welsh Springer Spaniel",
|
136 |
+
"116": "West Highland White Terrier",
|
137 |
+
"117": "Whippet",
|
138 |
+
"118": "Wire Haired Fox Terrier",
|
139 |
+
"119": "Yorkshire Terrier"
|
140 |
+
},
|
141 |
+
"image_size": 256,
|
142 |
+
"initializer_range": 0.02,
|
143 |
+
"label2id": {
|
144 |
+
"Affenpinscher": 0,
|
145 |
+
"Afghan Hound": 1,
|
146 |
+
"African Hunting Dog": 2,
|
147 |
+
"Airedale": 3,
|
148 |
+
"American Staffordshire Terrier": 4,
|
149 |
+
"Appenzeller": 5,
|
150 |
+
"Australian Terrier": 6,
|
151 |
+
"Basenji": 7,
|
152 |
+
"Basset": 8,
|
153 |
+
"Beagle": 9,
|
154 |
+
"Bedlington Terrier": 10,
|
155 |
+
"Bernese Mountain Dog": 11,
|
156 |
+
"Black And Tan Coonhound": 12,
|
157 |
+
"Blenheim Spaniel": 13,
|
158 |
+
"Bloodhound": 14,
|
159 |
+
"Bluetick": 15,
|
160 |
+
"Border Collie": 16,
|
161 |
+
"Border Terrier": 17,
|
162 |
+
"Borzoi": 18,
|
163 |
+
"Boston Bull": 19,
|
164 |
+
"Bouvier Des Flandres": 20,
|
165 |
+
"Boxer": 21,
|
166 |
+
"Brabancon Griffon": 22,
|
167 |
+
"Briard": 23,
|
168 |
+
"Brittany Spaniel": 24,
|
169 |
+
"Bull Mastiff": 25,
|
170 |
+
"Cairn": 26,
|
171 |
+
"Cardigan": 27,
|
172 |
+
"Chesapeake Bay Retriever": 28,
|
173 |
+
"Chihuahua": 29,
|
174 |
+
"Chow": 30,
|
175 |
+
"Clumber": 31,
|
176 |
+
"Cocker Spaniel": 32,
|
177 |
+
"Collie": 33,
|
178 |
+
"Curly Coated Retriever": 34,
|
179 |
+
"Dandie Dinmont": 35,
|
180 |
+
"Dhole": 36,
|
181 |
+
"Dingo": 37,
|
182 |
+
"Doberman": 38,
|
183 |
+
"English Foxhound": 39,
|
184 |
+
"English Setter": 40,
|
185 |
+
"English Springer": 41,
|
186 |
+
"Entlebucher": 42,
|
187 |
+
"Eskimo Dog": 43,
|
188 |
+
"Flat Coated Retriever": 44,
|
189 |
+
"French Bulldog": 45,
|
190 |
+
"German Shepherd": 46,
|
191 |
+
"German Short Haired Pointer": 47,
|
192 |
+
"Giant Schnauzer": 48,
|
193 |
+
"Golden Retriever": 49,
|
194 |
+
"Gordon Setter": 50,
|
195 |
+
"Great Dane": 51,
|
196 |
+
"Great Pyrenees": 52,
|
197 |
+
"Greater Swiss Mountain Dog": 53,
|
198 |
+
"Groenendael": 54,
|
199 |
+
"Ibizan Hound": 55,
|
200 |
+
"Irish Setter": 56,
|
201 |
+
"Irish Terrier": 57,
|
202 |
+
"Irish Water Spaniel": 58,
|
203 |
+
"Irish Wolfhound": 59,
|
204 |
+
"Italian Greyhound": 60,
|
205 |
+
"Japanese Spaniel": 61,
|
206 |
+
"Keeshond": 62,
|
207 |
+
"Kelpie": 63,
|
208 |
+
"Kerry Blue Terrier": 64,
|
209 |
+
"Komondor": 65,
|
210 |
+
"Kuvasz": 66,
|
211 |
+
"Labrador Retriever": 67,
|
212 |
+
"Lakeland Terrier": 68,
|
213 |
+
"Leonberg": 69,
|
214 |
+
"Lhasa": 70,
|
215 |
+
"Malamute": 71,
|
216 |
+
"Malinois": 72,
|
217 |
+
"Maltese Dog": 73,
|
218 |
+
"Mexican Hairless": 74,
|
219 |
+
"Miniature Pinscher": 75,
|
220 |
+
"Miniature Poodle": 76,
|
221 |
+
"Miniature Schnauzer": 77,
|
222 |
+
"Newfoundland": 78,
|
223 |
+
"Norfolk Terrier": 79,
|
224 |
+
"Norwegian Elkhound": 80,
|
225 |
+
"Norwich Terrier": 81,
|
226 |
+
"Old English Sheepdog": 82,
|
227 |
+
"Otterhound": 83,
|
228 |
+
"Papillon": 84,
|
229 |
+
"Pekinese": 85,
|
230 |
+
"Pembroke": 86,
|
231 |
+
"Pomeranian": 87,
|
232 |
+
"Pug": 88,
|
233 |
+
"Redbone": 89,
|
234 |
+
"Rhodesian Ridgeback": 90,
|
235 |
+
"Rottweiler": 91,
|
236 |
+
"Saint Bernard": 92,
|
237 |
+
"Saluki": 93,
|
238 |
+
"Samoyed": 94,
|
239 |
+
"Schipperke": 95,
|
240 |
+
"Scotch Terrier": 96,
|
241 |
+
"Scottish Deerhound": 97,
|
242 |
+
"Sealyham Terrier": 98,
|
243 |
+
"Shetland Sheepdog": 99,
|
244 |
+
"Shih Tzu": 100,
|
245 |
+
"Siberian Husky": 101,
|
246 |
+
"Silky Terrier": 102,
|
247 |
+
"Soft Coated Wheaten Terrier": 103,
|
248 |
+
"Staffordshire Bullterrier": 104,
|
249 |
+
"Standard Poodle": 105,
|
250 |
+
"Standard Schnauzer": 106,
|
251 |
+
"Sussex Spaniel": 107,
|
252 |
+
"Tibetan Mastiff": 108,
|
253 |
+
"Tibetan Terrier": 109,
|
254 |
+
"Toy Poodle": 110,
|
255 |
+
"Toy Terrier": 111,
|
256 |
+
"Vizsla": 112,
|
257 |
+
"Walker Hound": 113,
|
258 |
+
"Weimaraner": 114,
|
259 |
+
"Welsh Springer Spaniel": 115,
|
260 |
+
"West Highland White Terrier": 116,
|
261 |
+
"Whippet": 117,
|
262 |
+
"Wire Haired Fox Terrier": 118,
|
263 |
+
"Yorkshire Terrier": 119
|
264 |
+
},
|
265 |
+
"layer_norm_eps": 1e-05,
|
266 |
+
"mlp_ratio": 4.0,
|
267 |
+
"model_type": "swinv2",
|
268 |
+
"num_channels": 3,
|
269 |
+
"num_heads": [
|
270 |
+
4,
|
271 |
+
8,
|
272 |
+
16,
|
273 |
+
32
|
274 |
+
],
|
275 |
+
"num_layers": 4,
|
276 |
+
"out_features": [
|
277 |
+
"stage4"
|
278 |
+
],
|
279 |
+
"out_indices": [
|
280 |
+
4
|
281 |
+
],
|
282 |
+
"patch_size": 4,
|
283 |
+
"path_norm": true,
|
284 |
+
"pretrained_window_sizes": [
|
285 |
+
0,
|
286 |
+
0,
|
287 |
+
0,
|
288 |
+
0
|
289 |
+
],
|
290 |
+
"problem_type": "single_label_classification",
|
291 |
+
"qkv_bias": true,
|
292 |
+
"stage_names": [
|
293 |
+
"stem",
|
294 |
+
"stage1",
|
295 |
+
"stage2",
|
296 |
+
"stage3",
|
297 |
+
"stage4"
|
298 |
+
],
|
299 |
+
"torch_dtype": "float32",
|
300 |
+
"transformers_version": "4.40.2",
|
301 |
+
"use_absolute_embeddings": false,
|
302 |
+
"window_size": 16
|
303 |
+
}
|
config.toml
ADDED
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
[training_args]
|
2 |
+
output_dir="/Users/andrewmayes/Openclassroom/CanineNet/code/"
|
3 |
+
evaluation_strategy="steps"
|
4 |
+
save_strategy="steps"
|
5 |
+
learning_rate=5e-5
|
6 |
+
#per_device_train_batch_size=32 # 512
|
7 |
+
#per_device_eval_batch_size=32 # 512
|
8 |
+
# num_train_epochs=5,
|
9 |
+
eval_delay=0 # 50
|
10 |
+
eval_steps=0.01
|
11 |
+
#eval_accumulation_steps
|
12 |
+
gradient_accumulation_steps=4
|
13 |
+
gradient_checkpointing=true
|
14 |
+
optim="adafactor"
|
15 |
+
max_steps=1000 # 100
|
16 |
+
#logging_dir=""
|
17 |
+
#log_level="error"
|
18 |
+
load_best_model_at_end=true
|
19 |
+
metric_for_best_model="f1"
|
20 |
+
greater_is_better=true
|
21 |
+
#use_mps_device=true
|
22 |
+
logging_steps=0.01
|
23 |
+
save_steps=0.01
|
24 |
+
#auto_find_batch_size=true
|
25 |
+
report_to="mlflow"
|
26 |
+
save_total_limit=2
|
27 |
+
#hub_model_id="amaye15/SwinV2-Base-Document-Classifier"
|
model.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:e18f50b9ae839ca8b94bea38205322291e4b0362b4df1f378fee5b9e1e22a2f9
|
3 |
+
size 348129336
|
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.485,
|
21 |
+
0.456,
|
22 |
+
0.406
|
23 |
+
],
|
24 |
+
"image_processor_type": "ViTImageProcessor",
|
25 |
+
"image_std": [
|
26 |
+
0.229,
|
27 |
+
0.224,
|
28 |
+
0.225
|
29 |
+
],
|
30 |
+
"resample": 3,
|
31 |
+
"rescale_factor": 0.00392156862745098,
|
32 |
+
"size": {
|
33 |
+
"height": 256,
|
34 |
+
"width": 256
|
35 |
+
}
|
36 |
+
}
|
train.ipynb
ADDED
The diff for this file is too large to render.
See raw diff
|
|
training_args.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:adbf3f8ee263e567b265649efdbd281e949370bde35f578c80c1251f0e7d969d
|
3 |
+
size 5112
|