avanishd commited on
Commit
5a2c88a
·
verified ·
1 Parent(s): 7fd020a

Train finetuned CIFAR-10 model

Browse files
Files changed (5) hide show
  1. README.md +76 -0
  2. config.json +49 -0
  3. model.safetensors +3 -0
  4. preprocessor_config.json +23 -0
  5. training_args.bin +3 -0
README.md ADDED
@@ -0,0 +1,76 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ library_name: transformers
3
+ license: apache-2.0
4
+ base_model: google/vit-base-patch16-224-in21k
5
+ tags:
6
+ - generated_from_trainer
7
+ datasets:
8
+ - cifar-10
9
+ metrics:
10
+ - accuracy
11
+ model-index:
12
+ - name: vit-base-patch16-224-in21k
13
+ results:
14
+ - task:
15
+ name: Image Classification
16
+ type: image-classification
17
+ dataset:
18
+ name: cifar-10
19
+ type: cifar-10
20
+ metrics:
21
+ - name: Accuracy
22
+ type: accuracy
23
+ value: 0.9793
24
+ ---
25
+
26
+ <!-- This model card has been generated automatically according to the information the Trainer had access to. You
27
+ should probably proofread and complete it, then remove this comment. -->
28
+
29
+ # vit-base-patch16-224-in21k
30
+
31
+ 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 cifar-10 dataset.
32
+ It achieves the following results on the evaluation set:
33
+ - Loss: 0.3125
34
+ - Accuracy: 0.9793
35
+
36
+ ## Model description
37
+
38
+ More information needed
39
+
40
+ ## Intended uses & limitations
41
+
42
+ More information needed
43
+
44
+ ## Training and evaluation data
45
+
46
+ More information needed
47
+
48
+ ## Training procedure
49
+
50
+ ### Training hyperparameters
51
+
52
+ The following hyperparameters were used during training:
53
+ - learning_rate: 5e-05
54
+ - train_batch_size: 32
55
+ - eval_batch_size: 32
56
+ - seed: 42
57
+ - gradient_accumulation_steps: 4
58
+ - total_train_batch_size: 128
59
+ - optimizer: Use OptimizerNames.ADAMW_TORCH with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
60
+ - lr_scheduler_type: linear
61
+ - lr_scheduler_warmup_ratio: 0.1
62
+ - num_epochs: 1
63
+
64
+ ### Training results
65
+
66
+ | Training Loss | Epoch | Step | Validation Loss | Accuracy |
67
+ |:-------------:|:------:|:----:|:---------------:|:--------:|
68
+ | 0.5245 | 0.9984 | 312 | 0.3125 | 0.9793 |
69
+
70
+
71
+ ### Framework versions
72
+
73
+ - Transformers 4.51.1
74
+ - Pytorch 2.6.0+cu124
75
+ - Datasets 3.5.0
76
+ - Tokenizers 0.21.1
config.json ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "ViTForImageClassification"
4
+ ],
5
+ "attention_probs_dropout_prob": 0.0,
6
+ "encoder_stride": 16,
7
+ "hidden_act": "gelu",
8
+ "hidden_dropout_prob": 0.0,
9
+ "hidden_size": 768,
10
+ "id2label": {
11
+ "0": "airplane",
12
+ "1": "automobile",
13
+ "2": "bird",
14
+ "3": "cat",
15
+ "4": "deer",
16
+ "5": "dog",
17
+ "6": "frog",
18
+ "7": "horse",
19
+ "8": "ship",
20
+ "9": "truck"
21
+ },
22
+ "image_size": 224,
23
+ "initializer_range": 0.02,
24
+ "intermediate_size": 3072,
25
+ "label2id": {
26
+ "airplane": 0,
27
+ "automobile": 1,
28
+ "bird": 2,
29
+ "cat": 3,
30
+ "deer": 4,
31
+ "dog": 5,
32
+ "frog": 6,
33
+ "horse": 7,
34
+ "ship": 8,
35
+ "truck": 9
36
+ },
37
+ "layer_norm_eps": 1e-12,
38
+ "model_type": "vit",
39
+ "num_attention_heads": 12,
40
+ "num_channels": 3,
41
+ "num_hidden_layers": 12,
42
+ "patch_size": 16,
43
+ "pooler_act": "tanh",
44
+ "pooler_output_size": 768,
45
+ "problem_type": "single_label_classification",
46
+ "qkv_bias": true,
47
+ "torch_dtype": "float32",
48
+ "transformers_version": "4.51.1"
49
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:910d503e2489adb08c94e2bd27cc8747fba2c45745ee0272ed9e3f51e99a50cb
3
+ size 343248584
preprocessor_config.json ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "do_convert_rgb": null,
3
+ "do_normalize": true,
4
+ "do_rescale": true,
5
+ "do_resize": true,
6
+ "image_mean": [
7
+ 0.5,
8
+ 0.5,
9
+ 0.5
10
+ ],
11
+ "image_processor_type": "ViTImageProcessor",
12
+ "image_std": [
13
+ 0.5,
14
+ 0.5,
15
+ 0.5
16
+ ],
17
+ "resample": 2,
18
+ "rescale_factor": 0.00392156862745098,
19
+ "size": {
20
+ "height": 224,
21
+ "width": 224
22
+ }
23
+ }
training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5d5a280e4071e79091e882cdc418ec344682d6a6a830c4f07e5104b7ac186ddb
3
+ size 5304