Natalia2314 commited on
Commit
f9cf1e6
1 Parent(s): e5a8efb

cats_vs_dogs

Browse files
README.md ADDED
@@ -0,0 +1,77 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ base_model: google/vit-base-patch16-224-in21k
4
+ tags:
5
+ - image-classification
6
+ - generated_from_trainer
7
+ datasets:
8
+ - cats_vs_dogs
9
+ metrics:
10
+ - accuracy
11
+ model-index:
12
+ - name: vit-base-catsVSdogs-demo-v5
13
+ results:
14
+ - task:
15
+ name: Image Classification
16
+ type: image-classification
17
+ dataset:
18
+ name: cats_vs_dogs
19
+ type: cats_vs_dogs
20
+ config: default
21
+ split: train
22
+ args: default
23
+ metrics:
24
+ - name: Accuracy
25
+ type: accuracy
26
+ value: 0.98
27
+ ---
28
+
29
+ <!-- This model card has been generated automatically according to the information the Trainer had access to. You
30
+ should probably proofread and complete it, then remove this comment. -->
31
+
32
+ # vit-base-catsVSdogs-demo-v5
33
+
34
+ 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 cats_vs_dogs dataset.
35
+ It achieves the following results on the evaluation set:
36
+ - Loss: 0.0523
37
+ - Accuracy: 0.98
38
+
39
+ ## Model description
40
+
41
+ More information needed
42
+
43
+ ## Intended uses & limitations
44
+
45
+ More information needed
46
+
47
+ ## Training and evaluation data
48
+
49
+ More information needed
50
+
51
+ ## Training procedure
52
+
53
+ ### Training hyperparameters
54
+
55
+ The following hyperparameters were used during training:
56
+ - learning_rate: 0.0002
57
+ - train_batch_size: 16
58
+ - eval_batch_size: 8
59
+ - seed: 42
60
+ - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
61
+ - lr_scheduler_type: linear
62
+ - num_epochs: 4
63
+
64
+ ### Training results
65
+
66
+ | Training Loss | Epoch | Step | Validation Loss | Accuracy |
67
+ |:-------------:|:-----:|:----:|:---------------:|:--------:|
68
+ | 0.0337 | 2.0 | 100 | 0.0523 | 0.98 |
69
+ | 0.0038 | 4.0 | 200 | 0.0591 | 0.985 |
70
+
71
+
72
+ ### Framework versions
73
+
74
+ - Transformers 4.35.2
75
+ - Pytorch 2.1.0+cu118
76
+ - Datasets 2.15.0
77
+ - Tokenizers 0.15.0
all_results.json ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "epoch": 4.0,
3
+ "eval_accuracy": 0.98,
4
+ "eval_loss": 0.05225329101085663,
5
+ "eval_runtime": 175.9654,
6
+ "eval_samples_per_second": 1.137,
7
+ "eval_steps_per_second": 0.142,
8
+ "total_flos": 2.479743667666944e+17,
9
+ "train_loss": 0.06029550410807133,
10
+ "train_runtime": 7671.8377,
11
+ "train_samples_per_second": 0.417,
12
+ "train_steps_per_second": 0.026
13
+ }
config.json ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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": "cat",
13
+ "1": "dog"
14
+ },
15
+ "image_size": 224,
16
+ "initializer_range": 0.02,
17
+ "intermediate_size": 3072,
18
+ "label2id": {
19
+ "cat": "0",
20
+ "dog": "1"
21
+ },
22
+ "layer_norm_eps": 1e-12,
23
+ "model_type": "vit",
24
+ "num_attention_heads": 12,
25
+ "num_channels": 3,
26
+ "num_hidden_layers": 12,
27
+ "patch_size": 16,
28
+ "problem_type": "single_label_classification",
29
+ "qkv_bias": true,
30
+ "torch_dtype": "float32",
31
+ "transformers_version": "4.35.2"
32
+ }
eval_results.json ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "epoch": 4.0,
3
+ "eval_accuracy": 0.98,
4
+ "eval_loss": 0.05225329101085663,
5
+ "eval_runtime": 175.9654,
6
+ "eval_samples_per_second": 1.137,
7
+ "eval_steps_per_second": 0.142
8
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5fdc26c6330a5962da28f0a8a0fbe978eb1b1522e09485599f832257fe48b6da
3
+ size 343223968
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": "ViTFeatureExtractor",
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
+ }
runs/Dec01_00-23-32_3e969321df64/events.out.tfevents.1701390262.3e969321df64.329.3 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f18e38e0467a82a193a9c2dd97d97fb8fc08d47f42a0e44890239b2ed6b00c85
3
+ size 8327
runs/Dec01_00-23-32_3e969321df64/events.out.tfevents.1701398140.3e969321df64.329.4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3dcc2d31a9e4ef0a5d4f26b35f681ec32669d72f5115fbc669c0483b656ad7b3
3
+ size 411
runs/Nov30_20-18-04_3e969321df64/events.out.tfevents.1701375911.3e969321df64.329.0 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:860d27fb56f61b3fcf5559c0b423e18a1ff0af63f2cec6ea922250ca73f875d1
3
+ size 5307
runs/Nov30_21-13-42_3e969321df64/events.out.tfevents.1701378842.3e969321df64.329.1 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f7758e9e26de4e558b941bc5be5728f654c86134da04ecc06bf6a70c7e131b3d
3
+ size 13307
runs/Nov30_21-13-42_3e969321df64/events.out.tfevents.1701389962.3e969321df64.329.2 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c0f78060d617d933b44d1698371a93c015ac2892e1acb961a53f9833a4624a9b
3
+ size 4323
train_results.json ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "epoch": 4.0,
3
+ "total_flos": 2.479743667666944e+17,
4
+ "train_loss": 0.06029550410807133,
5
+ "train_runtime": 7671.8377,
6
+ "train_samples_per_second": 0.417,
7
+ "train_steps_per_second": 0.026
8
+ }
trainer_state.json ADDED
@@ -0,0 +1,166 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "best_metric": 0.05225329101085663,
3
+ "best_model_checkpoint": "./vit-base-catsVSdogs-demo-v5/checkpoint-100",
4
+ "epoch": 4.0,
5
+ "eval_steps": 100,
6
+ "global_step": 200,
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.2,
13
+ "learning_rate": 0.00019,
14
+ "loss": 0.4108,
15
+ "step": 10
16
+ },
17
+ {
18
+ "epoch": 0.4,
19
+ "learning_rate": 0.00018,
20
+ "loss": 0.1022,
21
+ "step": 20
22
+ },
23
+ {
24
+ "epoch": 0.6,
25
+ "learning_rate": 0.00017,
26
+ "loss": 0.2383,
27
+ "step": 30
28
+ },
29
+ {
30
+ "epoch": 0.8,
31
+ "learning_rate": 0.00016,
32
+ "loss": 0.1444,
33
+ "step": 40
34
+ },
35
+ {
36
+ "epoch": 1.0,
37
+ "learning_rate": 0.00015000000000000001,
38
+ "loss": 0.0812,
39
+ "step": 50
40
+ },
41
+ {
42
+ "epoch": 1.2,
43
+ "learning_rate": 0.00014,
44
+ "loss": 0.0268,
45
+ "step": 60
46
+ },
47
+ {
48
+ "epoch": 1.4,
49
+ "learning_rate": 0.00013000000000000002,
50
+ "loss": 0.0375,
51
+ "step": 70
52
+ },
53
+ {
54
+ "epoch": 1.6,
55
+ "learning_rate": 0.00012,
56
+ "loss": 0.0088,
57
+ "step": 80
58
+ },
59
+ {
60
+ "epoch": 1.8,
61
+ "learning_rate": 0.00011000000000000002,
62
+ "loss": 0.0227,
63
+ "step": 90
64
+ },
65
+ {
66
+ "epoch": 2.0,
67
+ "learning_rate": 0.0001,
68
+ "loss": 0.0337,
69
+ "step": 100
70
+ },
71
+ {
72
+ "epoch": 2.0,
73
+ "eval_accuracy": 0.98,
74
+ "eval_loss": 0.05225329101085663,
75
+ "eval_runtime": 164.0992,
76
+ "eval_samples_per_second": 1.219,
77
+ "eval_steps_per_second": 0.152,
78
+ "step": 100
79
+ },
80
+ {
81
+ "epoch": 2.2,
82
+ "learning_rate": 9e-05,
83
+ "loss": 0.0065,
84
+ "step": 110
85
+ },
86
+ {
87
+ "epoch": 2.4,
88
+ "learning_rate": 8e-05,
89
+ "loss": 0.0055,
90
+ "step": 120
91
+ },
92
+ {
93
+ "epoch": 2.6,
94
+ "learning_rate": 7e-05,
95
+ "loss": 0.0179,
96
+ "step": 130
97
+ },
98
+ {
99
+ "epoch": 2.8,
100
+ "learning_rate": 6e-05,
101
+ "loss": 0.016,
102
+ "step": 140
103
+ },
104
+ {
105
+ "epoch": 3.0,
106
+ "learning_rate": 5e-05,
107
+ "loss": 0.0314,
108
+ "step": 150
109
+ },
110
+ {
111
+ "epoch": 3.2,
112
+ "learning_rate": 4e-05,
113
+ "loss": 0.0067,
114
+ "step": 160
115
+ },
116
+ {
117
+ "epoch": 3.4,
118
+ "learning_rate": 3e-05,
119
+ "loss": 0.004,
120
+ "step": 170
121
+ },
122
+ {
123
+ "epoch": 3.6,
124
+ "learning_rate": 2e-05,
125
+ "loss": 0.0041,
126
+ "step": 180
127
+ },
128
+ {
129
+ "epoch": 3.8,
130
+ "learning_rate": 1e-05,
131
+ "loss": 0.0039,
132
+ "step": 190
133
+ },
134
+ {
135
+ "epoch": 4.0,
136
+ "learning_rate": 0.0,
137
+ "loss": 0.0038,
138
+ "step": 200
139
+ },
140
+ {
141
+ "epoch": 4.0,
142
+ "eval_accuracy": 0.985,
143
+ "eval_loss": 0.059128113090991974,
144
+ "eval_runtime": 162.5287,
145
+ "eval_samples_per_second": 1.231,
146
+ "eval_steps_per_second": 0.154,
147
+ "step": 200
148
+ },
149
+ {
150
+ "epoch": 4.0,
151
+ "step": 200,
152
+ "total_flos": 2.479743667666944e+17,
153
+ "train_loss": 0.06029550410807133,
154
+ "train_runtime": 7671.8377,
155
+ "train_samples_per_second": 0.417,
156
+ "train_steps_per_second": 0.026
157
+ }
158
+ ],
159
+ "logging_steps": 10,
160
+ "max_steps": 200,
161
+ "num_train_epochs": 4,
162
+ "save_steps": 100,
163
+ "total_flos": 2.479743667666944e+17,
164
+ "trial_name": null,
165
+ "trial_params": null
166
+ }
training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0068cdc49051a47482a2c72986ff01979c70ff51c0addb896801168db347bb7d
3
+ size 4600