phuong-tk-nguyen
commited on
Commit
•
537040b
1
Parent(s):
0a23225
Model save
Browse files- README.md +112 -0
- config.json +65 -0
- model.safetensors +3 -0
- preprocessor_config.json +22 -0
- training_args.bin +3 -0
README.md
ADDED
@@ -0,0 +1,112 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: apache-2.0
|
3 |
+
base_model: microsoft/resnet-50
|
4 |
+
tags:
|
5 |
+
- generated_from_trainer
|
6 |
+
datasets:
|
7 |
+
- imagefolder
|
8 |
+
metrics:
|
9 |
+
- accuracy
|
10 |
+
model-index:
|
11 |
+
- name: resnet-50-finetuned-cifar10
|
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.5022
|
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 |
+
# resnet-50-finetuned-cifar10
|
32 |
+
|
33 |
+
This model is a fine-tuned version of [microsoft/resnet-50](https://huggingface.co/microsoft/resnet-50) on the imagefolder dataset.
|
34 |
+
It achieves the following results on the evaluation set:
|
35 |
+
- Loss: 1.9064
|
36 |
+
- Accuracy: 0.5022
|
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: 1
|
65 |
+
|
66 |
+
### Training results
|
67 |
+
|
68 |
+
| Training Loss | Epoch | Step | Validation Loss | Accuracy |
|
69 |
+
|:-------------:|:-----:|:----:|:---------------:|:--------:|
|
70 |
+
| 2.3058 | 0.03 | 10 | 2.3106 | 0.0794 |
|
71 |
+
| 2.3033 | 0.06 | 20 | 2.3026 | 0.0892 |
|
72 |
+
| 2.3012 | 0.09 | 30 | 2.2971 | 0.1042 |
|
73 |
+
| 2.2914 | 0.11 | 40 | 2.2890 | 0.1254 |
|
74 |
+
| 2.2869 | 0.14 | 50 | 2.2816 | 0.16 |
|
75 |
+
| 2.2785 | 0.17 | 60 | 2.2700 | 0.1902 |
|
76 |
+
| 2.2712 | 0.2 | 70 | 2.2602 | 0.2354 |
|
77 |
+
| 2.2619 | 0.23 | 80 | 2.2501 | 0.2688 |
|
78 |
+
| 2.2509 | 0.26 | 90 | 2.2383 | 0.3022 |
|
79 |
+
| 2.2382 | 0.28 | 100 | 2.2229 | 0.3268 |
|
80 |
+
| 2.2255 | 0.31 | 110 | 2.2084 | 0.353 |
|
81 |
+
| 2.2164 | 0.34 | 120 | 2.1939 | 0.3608 |
|
82 |
+
| 2.2028 | 0.37 | 130 | 2.1829 | 0.3668 |
|
83 |
+
| 2.1977 | 0.4 | 140 | 2.1646 | 0.401 |
|
84 |
+
| 2.1844 | 0.43 | 150 | 2.1441 | 0.4244 |
|
85 |
+
| 2.1689 | 0.45 | 160 | 2.1323 | 0.437 |
|
86 |
+
| 2.1555 | 0.48 | 170 | 2.1159 | 0.4462 |
|
87 |
+
| 2.1448 | 0.51 | 180 | 2.0992 | 0.45 |
|
88 |
+
| 2.1313 | 0.54 | 190 | 2.0810 | 0.4642 |
|
89 |
+
| 2.1189 | 0.57 | 200 | 2.0589 | 0.4708 |
|
90 |
+
| 2.1111 | 0.6 | 210 | 2.0430 | 0.4828 |
|
91 |
+
| 2.0905 | 0.63 | 220 | 2.0288 | 0.4938 |
|
92 |
+
| 2.082 | 0.65 | 230 | 2.0089 | 0.4938 |
|
93 |
+
| 2.0646 | 0.68 | 240 | 1.9970 | 0.5014 |
|
94 |
+
| 2.0636 | 0.71 | 250 | 1.9778 | 0.4946 |
|
95 |
+
| 2.0579 | 0.74 | 260 | 1.9609 | 0.49 |
|
96 |
+
| 2.028 | 0.77 | 270 | 1.9602 | 0.4862 |
|
97 |
+
| 2.0447 | 0.8 | 280 | 1.9460 | 0.4934 |
|
98 |
+
| 2.0168 | 0.82 | 290 | 1.9369 | 0.505 |
|
99 |
+
| 2.0126 | 0.85 | 300 | 1.9317 | 0.4926 |
|
100 |
+
| 2.0099 | 0.88 | 310 | 1.9235 | 0.4952 |
|
101 |
+
| 1.9978 | 0.91 | 320 | 1.9174 | 0.4972 |
|
102 |
+
| 1.9951 | 0.94 | 330 | 1.9119 | 0.507 |
|
103 |
+
| 1.9823 | 0.97 | 340 | 1.9120 | 0.4992 |
|
104 |
+
| 1.985 | 1.0 | 350 | 1.9064 | 0.5022 |
|
105 |
+
|
106 |
+
|
107 |
+
### Framework versions
|
108 |
+
|
109 |
+
- Transformers 4.35.0
|
110 |
+
- Pytorch 2.1.1
|
111 |
+
- Datasets 2.14.6
|
112 |
+
- Tokenizers 0.14.1
|
config.json
ADDED
@@ -0,0 +1,65 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_name_or_path": "microsoft/resnet-50",
|
3 |
+
"architectures": [
|
4 |
+
"ResNetForImageClassification"
|
5 |
+
],
|
6 |
+
"depths": [
|
7 |
+
3,
|
8 |
+
4,
|
9 |
+
6,
|
10 |
+
3
|
11 |
+
],
|
12 |
+
"downsample_in_bottleneck": false,
|
13 |
+
"downsample_in_first_stage": false,
|
14 |
+
"embedding_size": 64,
|
15 |
+
"hidden_act": "relu",
|
16 |
+
"hidden_sizes": [
|
17 |
+
256,
|
18 |
+
512,
|
19 |
+
1024,
|
20 |
+
2048
|
21 |
+
],
|
22 |
+
"id2label": {
|
23 |
+
"0": "Airplane",
|
24 |
+
"1": "Automobile",
|
25 |
+
"2": "Bird",
|
26 |
+
"3": "Cat",
|
27 |
+
"4": "Deer",
|
28 |
+
"5": "Dog",
|
29 |
+
"6": "Frog",
|
30 |
+
"7": "Horse",
|
31 |
+
"8": "Ship",
|
32 |
+
"9": "Truck"
|
33 |
+
},
|
34 |
+
"label2id": {
|
35 |
+
"Airplane": 0,
|
36 |
+
"Automobile": 1,
|
37 |
+
"Bird": 2,
|
38 |
+
"Cat": 3,
|
39 |
+
"Deer": 4,
|
40 |
+
"Dog": 5,
|
41 |
+
"Frog": 6,
|
42 |
+
"Horse": 7,
|
43 |
+
"Ship": 8,
|
44 |
+
"Truck": 9
|
45 |
+
},
|
46 |
+
"layer_type": "bottleneck",
|
47 |
+
"model_type": "resnet",
|
48 |
+
"num_channels": 3,
|
49 |
+
"out_features": [
|
50 |
+
"stage4"
|
51 |
+
],
|
52 |
+
"out_indices": [
|
53 |
+
4
|
54 |
+
],
|
55 |
+
"problem_type": "single_label_classification",
|
56 |
+
"stage_names": [
|
57 |
+
"stem",
|
58 |
+
"stage1",
|
59 |
+
"stage2",
|
60 |
+
"stage3",
|
61 |
+
"stage4"
|
62 |
+
],
|
63 |
+
"torch_dtype": "float32",
|
64 |
+
"transformers_version": "4.35.0"
|
65 |
+
}
|
model.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:9d68b1283c09e88286fb9621b92e917ceef1e2f9354101412f90e8b66ef796a0
|
3 |
+
size 94368544
|
preprocessor_config.json
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"crop_pct": 0.875,
|
3 |
+
"do_normalize": true,
|
4 |
+
"do_rescale": true,
|
5 |
+
"do_resize": true,
|
6 |
+
"image_mean": [
|
7 |
+
0.485,
|
8 |
+
0.456,
|
9 |
+
0.406
|
10 |
+
],
|
11 |
+
"image_processor_type": "ConvNextImageProcessor",
|
12 |
+
"image_std": [
|
13 |
+
0.229,
|
14 |
+
0.224,
|
15 |
+
0.225
|
16 |
+
],
|
17 |
+
"resample": 3,
|
18 |
+
"rescale_factor": 0.00392156862745098,
|
19 |
+
"size": {
|
20 |
+
"shortest_edge": 224
|
21 |
+
}
|
22 |
+
}
|
training_args.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:59817c36aa97e31ab96ce31d66dccea166f2f97befee3da922f66d5e2d603849
|
3 |
+
size 4600
|