mostafasmart commited on
Commit
56d73d1
1 Parent(s): f754104

Upload TFViTForImageClassification

Browse files
Files changed (3) hide show
  1. README.md +62 -0
  2. config.json +36 -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: 5class224_b_p_c_u_n
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
+ # 5class224_b_p_c_u_n
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.0113
19
+ - Train Accuracy: 0.9459
20
+ - Train Top-3-accuracy: 0.9925
21
+ - Validation Loss: 0.1326
22
+ - Validation Accuracy: 0.9504
23
+ - Validation Top-3-accuracy: 0.9932
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': 585, '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.6186 | 0.6303 | 0.9043 | 0.2809 | 0.8026 | 0.9654 | 0 |
51
+ | 0.1012 | 0.8565 | 0.9767 | 0.1746 | 0.8901 | 0.9832 | 1 |
52
+ | 0.0296 | 0.9093 | 0.9865 | 0.1447 | 0.9234 | 0.9888 | 2 |
53
+ | 0.0137 | 0.9329 | 0.9904 | 0.1352 | 0.9404 | 0.9915 | 3 |
54
+ | 0.0113 | 0.9459 | 0.9925 | 0.1326 | 0.9504 | 0.9932 | 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,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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": "blepharitis",
14
+ "2": "cataract",
15
+ "3": "pterygium",
16
+ "4": "unKnown"
17
+ },
18
+ "image_size": 224,
19
+ "initializer_range": 0.02,
20
+ "intermediate_size": 3072,
21
+ "label2id": {
22
+ "Normaleyes": "0",
23
+ "blepharitis": "1",
24
+ "cataract": "2",
25
+ "pterygium": "3",
26
+ "unKnown": "4"
27
+ },
28
+ "layer_norm_eps": 1e-12,
29
+ "model_type": "vit",
30
+ "num_attention_heads": 12,
31
+ "num_channels": 3,
32
+ "num_hidden_layers": 12,
33
+ "patch_size": 16,
34
+ "qkv_bias": true,
35
+ "transformers_version": "4.41.2"
36
+ }
tf_model.h5 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1b1930a056db7bc613a013cacb145e3fcf3099c265f65f9267bf37905d44dd97
3
+ size 343478968