Upload TFViTForImageClassification
Browse files- README.md +70 -0
- config.json +35 -0
- 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_classifier
|
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_classifier
|
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.0945
|
20 |
+
- Validation Loss: 1.7241
|
21 |
+
- Train Accuracy: 0.6974
|
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.7946 | 1.1484 | 0.6272 | 0 |
|
49 |
+
| 0.3246 | 1.1792 | 0.6769 | 1 |
|
50 |
+
| 0.2266 | 1.2812 | 0.6842 | 2 |
|
51 |
+
| 0.1841 | 1.5085 | 0.6754 | 3 |
|
52 |
+
| 0.1589 | 1.4224 | 0.6944 | 4 |
|
53 |
+
| 0.1244 | 1.4229 | 0.6901 | 5 |
|
54 |
+
| 0.1174 | 1.4858 | 0.6784 | 6 |
|
55 |
+
| 0.1133 | 1.4221 | 0.6974 | 7 |
|
56 |
+
| 0.1026 | 1.4273 | 0.7003 | 8 |
|
57 |
+
| 0.1083 | 1.5406 | 0.7003 | 9 |
|
58 |
+
| 0.1038 | 1.6223 | 0.6974 | 10 |
|
59 |
+
| 0.0876 | 1.5613 | 0.6959 | 11 |
|
60 |
+
| 0.1018 | 1.4540 | 0.7149 | 12 |
|
61 |
+
| 0.0808 | 1.4853 | 0.7193 | 13 |
|
62 |
+
| 0.0945 | 1.7241 | 0.6974 | 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:f53ca4dd60a996b67e3d9967bc174fb0c4cc55c243a3de2a0836ba865df287a1
|
3 |
+
size 343475896
|