NiharGupte
commited on
Commit
•
f207a7a
1
Parent(s):
50365cd
Training in progress, epoch 0
Browse files- README.md +80 -0
- all_results.json +8 -0
- config.json +69 -0
- model.safetensors +3 -0
- preprocessor_config.json +22 -0
- runs/Apr15_01-15-18_076be6699dc0/events.out.tfevents.1713143742.076be6699dc0.466.0 +3 -0
- runs/Apr15_01-18-49_076be6699dc0/events.out.tfevents.1713143937.076be6699dc0.466.1 +3 -0
- runs/Apr15_01-21-15_076be6699dc0/events.out.tfevents.1713144081.076be6699dc0.466.2 +3 -0
- runs/Apr15_01-25-06_076be6699dc0/events.out.tfevents.1713144313.076be6699dc0.466.3 +3 -0
- train_results.json +8 -0
- trainer_state.json +78 -0
- training_args.bin +3 -0
README.md
ADDED
@@ -0,0 +1,80 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: apache-2.0
|
3 |
+
base_model: microsoft/swin-tiny-patch4-window7-224
|
4 |
+
tags:
|
5 |
+
- generated_from_trainer
|
6 |
+
datasets:
|
7 |
+
- imagefolder
|
8 |
+
metrics:
|
9 |
+
- accuracy
|
10 |
+
model-index:
|
11 |
+
- name: swin-tiny-patch4-window7-224-finetuned-student_six_classes
|
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.7751572327044025
|
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 |
+
# swin-tiny-patch4-window7-224-finetuned-student_six_classes
|
32 |
+
|
33 |
+
This model is a fine-tuned version of [microsoft/swin-tiny-patch4-window7-224](https://huggingface.co/microsoft/swin-tiny-patch4-window7-224) on the imagefolder dataset.
|
34 |
+
It achieves the following results on the evaluation set:
|
35 |
+
- Loss: 0.4916
|
36 |
+
- Accuracy: 0.7752
|
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: 3
|
65 |
+
|
66 |
+
### Training results
|
67 |
+
|
68 |
+
| Training Loss | Epoch | Step | Validation Loss | Accuracy |
|
69 |
+
|:-------------:|:-----:|:----:|:---------------:|:--------:|
|
70 |
+
| 1.4387 | 0.94 | 11 | 0.9083 | 0.6368 |
|
71 |
+
| 0.7445 | 1.96 | 23 | 0.5326 | 0.8553 |
|
72 |
+
| 0.4879 | 2.81 | 33 | 0.4916 | 0.7752 |
|
73 |
+
|
74 |
+
|
75 |
+
### Framework versions
|
76 |
+
|
77 |
+
- Transformers 4.38.2
|
78 |
+
- Pytorch 2.2.1+cu121
|
79 |
+
- Datasets 2.18.0
|
80 |
+
- Tokenizers 0.15.2
|
all_results.json
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"epoch": 2.81,
|
3 |
+
"total_flos": 1.0400908167453082e+17,
|
4 |
+
"train_loss": 0.8560382669622247,
|
5 |
+
"train_runtime": 123.6615,
|
6 |
+
"train_samples_per_second": 36.001,
|
7 |
+
"train_steps_per_second": 0.267
|
8 |
+
}
|
config.json
ADDED
@@ -0,0 +1,69 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_name_or_path": "microsoft/swin-tiny-patch4-window7-224",
|
3 |
+
"architectures": [
|
4 |
+
"SwinForImageClassification"
|
5 |
+
],
|
6 |
+
"attention_probs_dropout_prob": 0.0,
|
7 |
+
"depths": [
|
8 |
+
2,
|
9 |
+
2,
|
10 |
+
6,
|
11 |
+
2
|
12 |
+
],
|
13 |
+
"drop_path_rate": 0.1,
|
14 |
+
"embed_dim": 96,
|
15 |
+
"encoder_stride": 32,
|
16 |
+
"hidden_act": "gelu",
|
17 |
+
"hidden_dropout_prob": 0.0,
|
18 |
+
"hidden_size": 768,
|
19 |
+
"id2label": {
|
20 |
+
"0": "Looking Away",
|
21 |
+
"1": "bored",
|
22 |
+
"2": "confused",
|
23 |
+
"3": "drowsy",
|
24 |
+
"4": "engaged",
|
25 |
+
"5": "frustrated"
|
26 |
+
},
|
27 |
+
"image_size": 224,
|
28 |
+
"initializer_range": 0.02,
|
29 |
+
"label2id": {
|
30 |
+
"Looking Away": 0,
|
31 |
+
"bored": 1,
|
32 |
+
"confused": 2,
|
33 |
+
"drowsy": 3,
|
34 |
+
"engaged": 4,
|
35 |
+
"frustrated": 5
|
36 |
+
},
|
37 |
+
"layer_norm_eps": 1e-05,
|
38 |
+
"mlp_ratio": 4.0,
|
39 |
+
"model_type": "swin",
|
40 |
+
"num_channels": 3,
|
41 |
+
"num_heads": [
|
42 |
+
3,
|
43 |
+
6,
|
44 |
+
12,
|
45 |
+
24
|
46 |
+
],
|
47 |
+
"num_layers": 4,
|
48 |
+
"out_features": [
|
49 |
+
"stage4"
|
50 |
+
],
|
51 |
+
"out_indices": [
|
52 |
+
4
|
53 |
+
],
|
54 |
+
"patch_size": 4,
|
55 |
+
"path_norm": true,
|
56 |
+
"problem_type": "single_label_classification",
|
57 |
+
"qkv_bias": true,
|
58 |
+
"stage_names": [
|
59 |
+
"stem",
|
60 |
+
"stage1",
|
61 |
+
"stage2",
|
62 |
+
"stage3",
|
63 |
+
"stage4"
|
64 |
+
],
|
65 |
+
"torch_dtype": "float32",
|
66 |
+
"transformers_version": "4.38.2",
|
67 |
+
"use_absolute_embeddings": false,
|
68 |
+
"window_size": 7
|
69 |
+
}
|
model.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:f29aa4be255c19a5bcb2791d7e70701e7702d0014087ee593787a7c6bcf0f77d
|
3 |
+
size 110355136
|
preprocessor_config.json
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"do_normalize": true,
|
3 |
+
"do_rescale": true,
|
4 |
+
"do_resize": true,
|
5 |
+
"image_mean": [
|
6 |
+
0.485,
|
7 |
+
0.456,
|
8 |
+
0.406
|
9 |
+
],
|
10 |
+
"image_processor_type": "ViTImageProcessor",
|
11 |
+
"image_std": [
|
12 |
+
0.229,
|
13 |
+
0.224,
|
14 |
+
0.225
|
15 |
+
],
|
16 |
+
"resample": 3,
|
17 |
+
"rescale_factor": 0.00392156862745098,
|
18 |
+
"size": {
|
19 |
+
"height": 224,
|
20 |
+
"width": 224
|
21 |
+
}
|
22 |
+
}
|
runs/Apr15_01-15-18_076be6699dc0/events.out.tfevents.1713143742.076be6699dc0.466.0
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:7901b969ea54268ccca6998dc7ef3978d5f5b82182a00c9fb778edbe806934ae
|
3 |
+
size 7152
|
runs/Apr15_01-18-49_076be6699dc0/events.out.tfevents.1713143937.076be6699dc0.466.1
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:f8418e0d1de9edc23dafba5db8e39ace1823a405139ae044ee9fd9d4c3836ddc
|
3 |
+
size 7061
|
runs/Apr15_01-21-15_076be6699dc0/events.out.tfevents.1713144081.076be6699dc0.466.2
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:9e34b8baaf0a81915dc81bf6a41bde79c508a04f19ce813d4c850483fa78d35c
|
3 |
+
size 7536
|
runs/Apr15_01-25-06_076be6699dc0/events.out.tfevents.1713144313.076be6699dc0.466.3
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:7101de40e04769bba5d61d2e15d30634671d1a618de52af4a6a8551c0db31902
|
3 |
+
size 5757
|
train_results.json
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"epoch": 2.81,
|
3 |
+
"total_flos": 1.0400908167453082e+17,
|
4 |
+
"train_loss": 0.8560382669622247,
|
5 |
+
"train_runtime": 123.6615,
|
6 |
+
"train_samples_per_second": 36.001,
|
7 |
+
"train_steps_per_second": 0.267
|
8 |
+
}
|
trainer_state.json
ADDED
@@ -0,0 +1,78 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"best_metric": 0.8553459119496856,
|
3 |
+
"best_model_checkpoint": "swin-tiny-patch4-window7-224-finetuned-student_six_classes/checkpoint-23",
|
4 |
+
"epoch": 2.8085106382978724,
|
5 |
+
"eval_steps": 500,
|
6 |
+
"global_step": 33,
|
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.85,
|
13 |
+
"grad_norm": 5.6343159675598145,
|
14 |
+
"learning_rate": 3.965517241379311e-05,
|
15 |
+
"loss": 1.4387,
|
16 |
+
"step": 10
|
17 |
+
},
|
18 |
+
{
|
19 |
+
"epoch": 0.94,
|
20 |
+
"eval_accuracy": 0.6367924528301887,
|
21 |
+
"eval_loss": 0.9083201885223389,
|
22 |
+
"eval_runtime": 8.5969,
|
23 |
+
"eval_samples_per_second": 73.98,
|
24 |
+
"eval_steps_per_second": 2.326,
|
25 |
+
"step": 11
|
26 |
+
},
|
27 |
+
{
|
28 |
+
"epoch": 1.7,
|
29 |
+
"grad_norm": 9.409465789794922,
|
30 |
+
"learning_rate": 2.2413793103448276e-05,
|
31 |
+
"loss": 0.7445,
|
32 |
+
"step": 20
|
33 |
+
},
|
34 |
+
{
|
35 |
+
"epoch": 1.96,
|
36 |
+
"eval_accuracy": 0.8553459119496856,
|
37 |
+
"eval_loss": 0.532645583152771,
|
38 |
+
"eval_runtime": 10.5737,
|
39 |
+
"eval_samples_per_second": 60.149,
|
40 |
+
"eval_steps_per_second": 1.891,
|
41 |
+
"step": 23
|
42 |
+
},
|
43 |
+
{
|
44 |
+
"epoch": 2.55,
|
45 |
+
"grad_norm": 7.701065540313721,
|
46 |
+
"learning_rate": 5.172413793103448e-06,
|
47 |
+
"loss": 0.4879,
|
48 |
+
"step": 30
|
49 |
+
},
|
50 |
+
{
|
51 |
+
"epoch": 2.81,
|
52 |
+
"eval_accuracy": 0.7751572327044025,
|
53 |
+
"eval_loss": 0.4916297495365143,
|
54 |
+
"eval_runtime": 7.7495,
|
55 |
+
"eval_samples_per_second": 82.07,
|
56 |
+
"eval_steps_per_second": 2.581,
|
57 |
+
"step": 33
|
58 |
+
},
|
59 |
+
{
|
60 |
+
"epoch": 2.81,
|
61 |
+
"step": 33,
|
62 |
+
"total_flos": 1.0400908167453082e+17,
|
63 |
+
"train_loss": 0.8560382669622247,
|
64 |
+
"train_runtime": 123.6615,
|
65 |
+
"train_samples_per_second": 36.001,
|
66 |
+
"train_steps_per_second": 0.267
|
67 |
+
}
|
68 |
+
],
|
69 |
+
"logging_steps": 10,
|
70 |
+
"max_steps": 33,
|
71 |
+
"num_input_tokens_seen": 0,
|
72 |
+
"num_train_epochs": 3,
|
73 |
+
"save_steps": 500,
|
74 |
+
"total_flos": 1.0400908167453082e+17,
|
75 |
+
"train_batch_size": 32,
|
76 |
+
"trial_name": null,
|
77 |
+
"trial_params": null
|
78 |
+
}
|
training_args.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:b4cd09b88621b4b40848428a2f1450dad31a4091f716ffb1dc04ede78b3a6dc8
|
3 |
+
size 4984
|