Binaryy commited on
Commit
b1fe6ca
·
verified ·
1 Parent(s): 468126f

🍻 cheers

Browse files
README.md ADDED
@@ -0,0 +1,97 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ library_name: transformers
3
+ license: apache-2.0
4
+ base_model: google/vit-base-patch16-224-in21k
5
+ tags:
6
+ - image-classification
7
+ - generated_from_trainer
8
+ datasets:
9
+ - imagefolder
10
+ metrics:
11
+ - accuracy
12
+ - f1
13
+ - precision
14
+ - recall
15
+ model-index:
16
+ - name: test-trainer
17
+ results:
18
+ - task:
19
+ name: Image Classification
20
+ type: image-classification
21
+ dataset:
22
+ name: Chess
23
+ type: imagefolder
24
+ config: default
25
+ split: train
26
+ args: default
27
+ metrics:
28
+ - name: Accuracy
29
+ type: accuracy
30
+ value: 0.9107142857142857
31
+ - name: F1
32
+ type: f1
33
+ value: 0.9121670865142396
34
+ - name: Precision
35
+ type: precision
36
+ value: 0.9171626984126985
37
+ - name: Recall
38
+ type: recall
39
+ value: 0.9107142857142857
40
+ ---
41
+
42
+ <!-- This model card has been generated automatically according to the information the Trainer had access to. You
43
+ should probably proofread and complete it, then remove this comment. -->
44
+
45
+ # test-trainer
46
+
47
+ 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 Chess dataset.
48
+ It achieves the following results on the evaluation set:
49
+ - Loss: 0.7291
50
+ - Accuracy: 0.9107
51
+ - F1: 0.9122
52
+ - Precision: 0.9172
53
+ - Recall: 0.9107
54
+
55
+ ## Model description
56
+
57
+ More information needed
58
+
59
+ ## Intended uses & limitations
60
+
61
+ More information needed
62
+
63
+ ## Training and evaluation data
64
+
65
+ More information needed
66
+
67
+ ## Training procedure
68
+
69
+ ### Training hyperparameters
70
+
71
+ The following hyperparameters were used during training:
72
+ - learning_rate: 2e-05
73
+ - train_batch_size: 10
74
+ - eval_batch_size: 4
75
+ - seed: 42
76
+ - optimizer: Use adamw_torch with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
77
+ - lr_scheduler_type: linear
78
+ - num_epochs: 30
79
+
80
+ ### Training results
81
+
82
+ | Training Loss | Epoch | Step | Validation Loss | Accuracy | F1 | Precision | Recall |
83
+ |:-------------:|:-----:|:----:|:---------------:|:--------:|:------:|:---------:|:------:|
84
+ | No log | 1.0 | 50 | 1.6720 | 0.4821 | 0.4134 | 0.3870 | 0.4821 |
85
+ | No log | 2.0 | 100 | 1.4652 | 0.6429 | 0.6126 | 0.7414 | 0.6429 |
86
+ | No log | 3.0 | 150 | 1.1742 | 0.7321 | 0.7210 | 0.7792 | 0.7321 |
87
+ | No log | 4.0 | 200 | 0.9813 | 0.8393 | 0.8433 | 0.8589 | 0.8393 |
88
+ | No log | 5.0 | 250 | 0.8312 | 0.8214 | 0.8164 | 0.8516 | 0.8214 |
89
+ | No log | 6.0 | 300 | 0.7291 | 0.9107 | 0.9122 | 0.9172 | 0.9107 |
90
+
91
+
92
+ ### Framework versions
93
+
94
+ - Transformers 4.46.2
95
+ - Pytorch 2.2.1+cu121
96
+ - Datasets 3.1.0
97
+ - Tokenizers 0.20.3
all_results.json ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "epoch": 6.0,
3
+ "total_flos": 2.3108939745841152e+17,
4
+ "train_loss": 1.2372085571289062,
5
+ "train_runtime": 74.6152,
6
+ "train_samples_per_second": 199.825,
7
+ "train_steps_per_second": 20.103
8
+ }
config.json ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "google/vit-base-patch16-224-in21k",
3
+ "architectures": [
4
+ "ViTForImageClassification"
5
+ ],
6
+ "attention_probs_dropout_prob": 0.0,
7
+ "encoder_stride": 16,
8
+ "hidden_act": "gelu",
9
+ "hidden_dropout_prob": 0.0,
10
+ "hidden_size": 768,
11
+ "id2label": {
12
+ "0": "Bishop",
13
+ "1": "King",
14
+ "2": "Knight",
15
+ "3": "Pawn",
16
+ "4": "Queen",
17
+ "5": "Rook"
18
+ },
19
+ "image_size": 224,
20
+ "initializer_range": 0.02,
21
+ "intermediate_size": 3072,
22
+ "label2id": {
23
+ "Bishop": 0,
24
+ "King": 1,
25
+ "Knight": 2,
26
+ "Pawn": 3,
27
+ "Queen": 4,
28
+ "Rook": 5
29
+ },
30
+ "layer_norm_eps": 1e-12,
31
+ "model_type": "vit",
32
+ "num_attention_heads": 12,
33
+ "num_channels": 3,
34
+ "num_hidden_layers": 12,
35
+ "patch_size": 16,
36
+ "problem_type": "single_label_classification",
37
+ "qkv_bias": true,
38
+ "torch_dtype": "float32",
39
+ "transformers_version": "4.46.2"
40
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d1bb1780e5120299da07c8a94a870963b865b5bd2ace81821659d676ca19222b
3
+ size 343236280
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.5,
7
+ 0.5,
8
+ 0.5
9
+ ],
10
+ "image_processor_type": "ViTImageProcessor",
11
+ "image_std": [
12
+ 0.5,
13
+ 0.5,
14
+ 0.5
15
+ ],
16
+ "resample": 2,
17
+ "rescale_factor": 0.00392156862745098,
18
+ "size": {
19
+ "height": 224,
20
+ "width": 224
21
+ }
22
+ }
train_results.json ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "epoch": 6.0,
3
+ "total_flos": 2.3108939745841152e+17,
4
+ "train_loss": 1.2372085571289062,
5
+ "train_runtime": 74.6152,
6
+ "train_samples_per_second": 199.825,
7
+ "train_steps_per_second": 20.103
8
+ }
trainer_state.json ADDED
@@ -0,0 +1,123 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "best_metric": 0.9107142857142857,
3
+ "best_model_checkpoint": "test-trainer/checkpoint-300",
4
+ "epoch": 6.0,
5
+ "eval_steps": 500,
6
+ "global_step": 300,
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
+ "eval_accuracy": 0.48214285714285715,
14
+ "eval_f1": 0.41339955022488756,
15
+ "eval_loss": 1.6720179319381714,
16
+ "eval_precision": 0.38696741854636585,
17
+ "eval_recall": 0.48214285714285715,
18
+ "eval_runtime": 1.2456,
19
+ "eval_samples_per_second": 44.958,
20
+ "eval_steps_per_second": 11.24,
21
+ "step": 50
22
+ },
23
+ {
24
+ "epoch": 2.0,
25
+ "eval_accuracy": 0.6428571428571429,
26
+ "eval_f1": 0.6126473922902493,
27
+ "eval_loss": 1.4651685953140259,
28
+ "eval_precision": 0.7413690476190476,
29
+ "eval_recall": 0.6428571428571429,
30
+ "eval_runtime": 1.2147,
31
+ "eval_samples_per_second": 46.104,
32
+ "eval_steps_per_second": 11.526,
33
+ "step": 100
34
+ },
35
+ {
36
+ "epoch": 3.0,
37
+ "eval_accuracy": 0.7321428571428571,
38
+ "eval_f1": 0.7210389711440132,
39
+ "eval_loss": 1.1741597652435303,
40
+ "eval_precision": 0.7791524943310657,
41
+ "eval_recall": 0.7321428571428571,
42
+ "eval_runtime": 1.2504,
43
+ "eval_samples_per_second": 44.787,
44
+ "eval_steps_per_second": 11.197,
45
+ "step": 150
46
+ },
47
+ {
48
+ "epoch": 4.0,
49
+ "eval_accuracy": 0.8392857142857143,
50
+ "eval_f1": 0.8433130175146982,
51
+ "eval_loss": 0.9812522530555725,
52
+ "eval_precision": 0.858866084312513,
53
+ "eval_recall": 0.8392857142857143,
54
+ "eval_runtime": 1.2079,
55
+ "eval_samples_per_second": 46.361,
56
+ "eval_steps_per_second": 11.59,
57
+ "step": 200
58
+ },
59
+ {
60
+ "epoch": 5.0,
61
+ "eval_accuracy": 0.8214285714285714,
62
+ "eval_f1": 0.8163565426170468,
63
+ "eval_loss": 0.8311730027198792,
64
+ "eval_precision": 0.8515512265512265,
65
+ "eval_recall": 0.8214285714285714,
66
+ "eval_runtime": 1.2437,
67
+ "eval_samples_per_second": 45.027,
68
+ "eval_steps_per_second": 11.257,
69
+ "step": 250
70
+ },
71
+ {
72
+ "epoch": 6.0,
73
+ "eval_accuracy": 0.9107142857142857,
74
+ "eval_f1": 0.9121670865142396,
75
+ "eval_loss": 0.7291183471679688,
76
+ "eval_precision": 0.9171626984126985,
77
+ "eval_recall": 0.9107142857142857,
78
+ "eval_runtime": 1.2203,
79
+ "eval_samples_per_second": 45.89,
80
+ "eval_steps_per_second": 11.472,
81
+ "step": 300
82
+ },
83
+ {
84
+ "epoch": 6.0,
85
+ "step": 300,
86
+ "total_flos": 2.3108939745841152e+17,
87
+ "train_loss": 1.2372085571289062,
88
+ "train_runtime": 74.6152,
89
+ "train_samples_per_second": 199.825,
90
+ "train_steps_per_second": 20.103
91
+ }
92
+ ],
93
+ "logging_steps": 500,
94
+ "max_steps": 1500,
95
+ "num_input_tokens_seen": 0,
96
+ "num_train_epochs": 30,
97
+ "save_steps": 500,
98
+ "stateful_callbacks": {
99
+ "EarlyStoppingCallback": {
100
+ "args": {
101
+ "early_stopping_patience": 5,
102
+ "early_stopping_threshold": 1.0
103
+ },
104
+ "attributes": {
105
+ "early_stopping_patience_counter": 5
106
+ }
107
+ },
108
+ "TrainerControl": {
109
+ "args": {
110
+ "should_epoch_stop": false,
111
+ "should_evaluate": false,
112
+ "should_log": false,
113
+ "should_save": true,
114
+ "should_training_stop": true
115
+ },
116
+ "attributes": {}
117
+ }
118
+ },
119
+ "total_flos": 2.3108939745841152e+17,
120
+ "train_batch_size": 10,
121
+ "trial_name": null,
122
+ "trial_params": null
123
+ }
training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ef88edba6af581510201d1a66ea3d97022b96a8fa04892b4840bdea7fe286935
3
+ size 5240