mostafasmart commited on
Commit
8dc0525
·
verified ·
1 Parent(s): 990da0c

Upload TFViTForImageClassification

Browse files
Files changed (3) hide show
  1. README.md +62 -0
  2. config.json +30 -0
  3. tf_model.h5 +3 -0
README.md ADDED
@@ -0,0 +1,62 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ base_model: google/vit-base-patch16-224
4
+ tags:
5
+ - generated_from_keras_callback
6
+ model-index:
7
+ - name: vit-base-patch16-224-2class_normal
8
+ results: []
9
+ ---
10
+
11
+ <!-- This model card has been generated automatically according to the information Keras had access to. You should
12
+ probably proofread and complete it, then remove this comment. -->
13
+
14
+ # vit-base-patch16-224-2class_normal
15
+
16
+ This model is a fine-tuned version of [google/vit-base-patch16-224](https://huggingface.co/google/vit-base-patch16-224) on an unknown dataset.
17
+ It achieves the following results on the evaluation set:
18
+ - Train Loss: 0.0023
19
+ - Train Accuracy: 0.9828
20
+ - Train Top-3-accuracy: 1.0
21
+ - Validation Loss: 0.1087
22
+ - Validation Accuracy: 0.9839
23
+ - Validation Top-3-accuracy: 1.0
24
+ - Epoch: 4
25
+
26
+ ## Model description
27
+
28
+ More information needed
29
+
30
+ ## Intended uses & limitations
31
+
32
+ More information needed
33
+
34
+ ## Training and evaluation data
35
+
36
+ More information needed
37
+
38
+ ## Training procedure
39
+
40
+ ### Training hyperparameters
41
+
42
+ The following hyperparameters were used during training:
43
+ - optimizer: {'name': 'AdamWeightDecay', 'learning_rate': {'module': 'keras.optimizers.schedules', 'class_name': 'PolynomialDecay', 'config': {'initial_learning_rate': 3e-05, 'decay_steps': 170, 'end_learning_rate': 0.0, 'power': 1.0, 'cycle': False, 'name': None}, 'registered_name': None}, 'decay': 0.0, 'beta_1': 0.9, 'beta_2': 0.999, 'epsilon': 1e-08, 'amsgrad': False, 'weight_decay_rate': 0.01}
44
+ - training_precision: float32
45
+
46
+ ### Training results
47
+
48
+ | Train Loss | Train Accuracy | Train Top-3-accuracy | Validation Loss | Validation Accuracy | Validation Top-3-accuracy | Epoch |
49
+ |:----------:|:--------------:|:--------------------:|:---------------:|:-------------------:|:-------------------------:|:-----:|
50
+ | 0.1803 | 0.8483 | 1.0 | 0.0796 | 0.9356 | 1.0 | 0 |
51
+ | 0.0129 | 0.9548 | 1.0 | 0.0797 | 0.9663 | 1.0 | 1 |
52
+ | 0.0042 | 0.9721 | 1.0 | 0.1078 | 0.9762 | 1.0 | 2 |
53
+ | 0.0026 | 0.9791 | 1.0 | 0.1077 | 0.9813 | 1.0 | 3 |
54
+ | 0.0023 | 0.9828 | 1.0 | 0.1087 | 0.9839 | 1.0 | 4 |
55
+
56
+
57
+ ### Framework versions
58
+
59
+ - Transformers 4.41.2
60
+ - TensorFlow 2.15.0
61
+ - Datasets 2.20.0
62
+ - Tokenizers 0.19.1
config.json ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "google/vit-base-patch16-224",
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": "Normaleyes",
13
+ "1": "notNormal"
14
+ },
15
+ "image_size": 224,
16
+ "initializer_range": 0.02,
17
+ "intermediate_size": 3072,
18
+ "label2id": {
19
+ "Normaleyes": "0",
20
+ "notNormal": "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
+ "qkv_bias": true,
29
+ "transformers_version": "4.41.2"
30
+ }
tf_model.h5 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5ba04ce1b579653ab2e8875c6b365e041bee4e3ebd4bd4a7abdceeb700f7042d
3
+ size 343469752