lincyaw commited on
Commit
3f8101b
1 Parent(s): eec2cb8

End of training

Browse files
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-eurosat
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.8821752265861027
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-eurosat
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.5173
36
+ - Accuracy: 0.8822
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: 224
57
+ - eval_batch_size: 224
58
+ - seed: 42
59
+ - gradient_accumulation_steps: 4
60
+ - total_train_batch_size: 896
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
+ | 2.0945 | 1.0 | 10 | 1.3185 | 0.5569 |
71
+ | 1.1055 | 2.0 | 20 | 0.6962 | 0.8379 |
72
+ | 0.6974 | 3.0 | 30 | 0.5173 | 0.8822 |
73
+
74
+
75
+ ### Framework versions
76
+
77
+ - Transformers 4.33.2
78
+ - Pytorch 2.0.1+cu117
79
+ - Datasets 2.14.5
80
+ - Tokenizers 0.13.3
all_results.json ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "epoch": 3.0,
3
+ "eval_accuracy": 0.8821752265861027,
4
+ "eval_loss": 0.5172543525695801,
5
+ "eval_runtime": 4.1466,
6
+ "eval_samples_per_second": 239.475,
7
+ "eval_steps_per_second": 1.206,
8
+ "total_flos": 6.66078011176919e+17,
9
+ "train_loss": 1.299128500620524,
10
+ "train_runtime": 138.8552,
11
+ "train_samples_per_second": 192.935,
12
+ "train_steps_per_second": 0.216
13
+ }
config.json ADDED
@@ -0,0 +1,81 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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": "battery",
21
+ "1": "biological",
22
+ "2": "brown-glass",
23
+ "3": "cardboard",
24
+ "4": "clothes",
25
+ "5": "green-glass",
26
+ "6": "metal",
27
+ "7": "paper",
28
+ "8": "plastic",
29
+ "9": "shoes",
30
+ "10": "trash",
31
+ "11": "white-glass"
32
+ },
33
+ "image_size": 224,
34
+ "initializer_range": 0.02,
35
+ "label2id": {
36
+ "battery": 0,
37
+ "biological": 1,
38
+ "brown-glass": 2,
39
+ "cardboard": 3,
40
+ "clothes": 4,
41
+ "green-glass": 5,
42
+ "metal": 6,
43
+ "paper": 7,
44
+ "plastic": 8,
45
+ "shoes": 9,
46
+ "trash": 10,
47
+ "white-glass": 11
48
+ },
49
+ "layer_norm_eps": 1e-05,
50
+ "mlp_ratio": 4.0,
51
+ "model_type": "swin",
52
+ "num_channels": 3,
53
+ "num_heads": [
54
+ 3,
55
+ 6,
56
+ 12,
57
+ 24
58
+ ],
59
+ "num_layers": 4,
60
+ "out_features": [
61
+ "stage4"
62
+ ],
63
+ "out_indices": [
64
+ 4
65
+ ],
66
+ "patch_size": 4,
67
+ "path_norm": true,
68
+ "problem_type": "single_label_classification",
69
+ "qkv_bias": true,
70
+ "stage_names": [
71
+ "stem",
72
+ "stage1",
73
+ "stage2",
74
+ "stage3",
75
+ "stage4"
76
+ ],
77
+ "torch_dtype": "float32",
78
+ "transformers_version": "4.33.2",
79
+ "use_absolute_embeddings": false,
80
+ "window_size": 7
81
+ }
eval_results.json ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "epoch": 3.0,
3
+ "eval_accuracy": 0.8821752265861027,
4
+ "eval_loss": 0.5172543525695801,
5
+ "eval_runtime": 4.1466,
6
+ "eval_samples_per_second": 239.475,
7
+ "eval_steps_per_second": 1.206
8
+ }
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
+ }
pytorch_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4f51098613e4fab69a2bb96514d01b5c031c1cfc43477a38c4fcebf6973e0a43
3
+ size 110425585
train_results.json ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "epoch": 3.0,
3
+ "total_flos": 6.66078011176919e+17,
4
+ "train_loss": 1.299128500620524,
5
+ "train_runtime": 138.8552,
6
+ "train_samples_per_second": 192.935,
7
+ "train_steps_per_second": 0.216
8
+ }
trainer_state.json ADDED
@@ -0,0 +1,73 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "best_metric": 0.8821752265861027,
3
+ "best_model_checkpoint": "swin-tiny-patch4-window7-224-finetuned-eurosat/checkpoint-30",
4
+ "epoch": 3.0,
5
+ "eval_steps": 500,
6
+ "global_step": 30,
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
+ "learning_rate": 3.7037037037037037e-05,
14
+ "loss": 2.0945,
15
+ "step": 10
16
+ },
17
+ {
18
+ "epoch": 1.0,
19
+ "eval_accuracy": 0.5568982880161127,
20
+ "eval_loss": 1.3184599876403809,
21
+ "eval_runtime": 4.1159,
22
+ "eval_samples_per_second": 241.258,
23
+ "eval_steps_per_second": 1.215,
24
+ "step": 10
25
+ },
26
+ {
27
+ "epoch": 2.0,
28
+ "learning_rate": 1.8518518518518518e-05,
29
+ "loss": 1.1055,
30
+ "step": 20
31
+ },
32
+ {
33
+ "epoch": 2.0,
34
+ "eval_accuracy": 0.837865055387714,
35
+ "eval_loss": 0.696175217628479,
36
+ "eval_runtime": 3.8784,
37
+ "eval_samples_per_second": 256.033,
38
+ "eval_steps_per_second": 1.289,
39
+ "step": 20
40
+ },
41
+ {
42
+ "epoch": 3.0,
43
+ "learning_rate": 0.0,
44
+ "loss": 0.6974,
45
+ "step": 30
46
+ },
47
+ {
48
+ "epoch": 3.0,
49
+ "eval_accuracy": 0.8821752265861027,
50
+ "eval_loss": 0.5172543525695801,
51
+ "eval_runtime": 4.1085,
52
+ "eval_samples_per_second": 241.693,
53
+ "eval_steps_per_second": 1.217,
54
+ "step": 30
55
+ },
56
+ {
57
+ "epoch": 3.0,
58
+ "step": 30,
59
+ "total_flos": 6.66078011176919e+17,
60
+ "train_loss": 1.299128500620524,
61
+ "train_runtime": 138.8552,
62
+ "train_samples_per_second": 192.935,
63
+ "train_steps_per_second": 0.216
64
+ }
65
+ ],
66
+ "logging_steps": 10,
67
+ "max_steps": 30,
68
+ "num_train_epochs": 3,
69
+ "save_steps": 500,
70
+ "total_flos": 6.66078011176919e+17,
71
+ "trial_name": null,
72
+ "trial_params": null
73
+ }
training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0c8c2482aaa4956592af6d98b263d3d76b8b39e243bf186fd2a104d6ad3e295d
3
+ size 4091