akar49 commited on
Commit
a3e6735
·
verified ·
1 Parent(s): 59046c6

Upload TFViTForImageClassification

Browse files
Files changed (3) hide show
  1. README.md +70 -0
  2. config.json +35 -0
  3. tf_model.h5 +3 -0
README.md ADDED
@@ -0,0 +1,70 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ library_name: transformers
3
+ license: apache-2.0
4
+ base_model: google/vit-base-patch16-224-in21k
5
+ tags:
6
+ - generated_from_keras_callback
7
+ model-index:
8
+ - name: VIT_fourclass_Jun25
9
+ results: []
10
+ ---
11
+
12
+ <!-- This model card has been generated automatically according to the information Keras had access to. You should
13
+ probably proofread and complete it, then remove this comment. -->
14
+
15
+ # VIT_fourclass_Jun25
16
+
17
+ This model is a fine-tuned version of [google/vit-base-patch16-224-in21k](https://huggingface.co/google/vit-base-patch16-224-in21k) on an unknown dataset.
18
+ It achieves the following results on the evaluation set:
19
+ - Train Loss: 0.0938
20
+ - Validation Loss: 2.3960
21
+ - Train Accuracy: 0.51
22
+ - Epoch: 14
23
+
24
+ ## Model description
25
+
26
+ More information needed
27
+
28
+ ## Intended uses & limitations
29
+
30
+ More information needed
31
+
32
+ ## Training and evaluation data
33
+
34
+ More information needed
35
+
36
+ ## Training procedure
37
+
38
+ ### Training hyperparameters
39
+
40
+ The following hyperparameters were used during training:
41
+ - optimizer: {'name': 'SGD', 'weight_decay': None, 'clipnorm': None, 'global_clipnorm': None, 'clipvalue': None, 'use_ema': False, 'ema_momentum': 0.99, 'ema_overwrite_frequency': None, 'jit_compile': True, 'is_legacy_optimizer': False, 'learning_rate': np.float32(0.01), 'momentum': 0.0, 'nesterov': False}
42
+ - training_precision: float32
43
+
44
+ ### Training results
45
+
46
+ | Train Loss | Validation Loss | Train Accuracy | Epoch |
47
+ |:----------:|:---------------:|:--------------:|:-----:|
48
+ | 0.9196 | 1.2060 | 0.38 | 0 |
49
+ | 0.3792 | 1.4807 | 0.48 | 1 |
50
+ | 0.2729 | 1.7396 | 0.45 | 2 |
51
+ | 0.2006 | 2.4379 | 0.29 | 3 |
52
+ | 0.1996 | 2.4795 | 0.36 | 4 |
53
+ | 0.1734 | 2.7916 | 0.35 | 5 |
54
+ | 0.1860 | 4.1270 | 0.09 | 6 |
55
+ | 0.1490 | 2.7235 | 0.37 | 7 |
56
+ | 0.1077 | 3.5380 | 0.26 | 8 |
57
+ | 0.1173 | 2.7697 | 0.42 | 9 |
58
+ | 0.1526 | 2.7868 | 0.42 | 10 |
59
+ | 0.1161 | 3.1132 | 0.36 | 11 |
60
+ | 0.1093 | 3.5738 | 0.33 | 12 |
61
+ | 0.0884 | 3.1227 | 0.37 | 13 |
62
+ | 0.0938 | 2.3960 | 0.51 | 14 |
63
+
64
+
65
+ ### Framework versions
66
+
67
+ - Transformers 4.52.4
68
+ - TensorFlow 2.18.0
69
+ - Datasets 3.6.0
70
+ - Tokenizers 0.21.1
config.json ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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": "glioma_tumor",
12
+ "1": "meningioma_tumor",
13
+ "2": "no_tumor",
14
+ "3": "pituitary_tumor"
15
+ },
16
+ "image_size": 224,
17
+ "initializer_range": 0.02,
18
+ "intermediate_size": 3072,
19
+ "label2id": {
20
+ "glioma_tumor": "0",
21
+ "meningioma_tumor": "1",
22
+ "no_tumor": "2",
23
+ "pituitary_tumor": "3"
24
+ },
25
+ "layer_norm_eps": 1e-12,
26
+ "model_type": "vit",
27
+ "num_attention_heads": 12,
28
+ "num_channels": 3,
29
+ "num_hidden_layers": 12,
30
+ "patch_size": 16,
31
+ "pooler_act": "tanh",
32
+ "pooler_output_size": 768,
33
+ "qkv_bias": true,
34
+ "transformers_version": "4.52.4"
35
+ }
tf_model.h5 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e5a63bbe6e26be9fdaae1b0d968af2a864ec7a4504ade4f4c7707ecbf0bdba24
3
+ size 343475896