Upload TFLayoutLMForTokenClassification
Browse files- README.md +66 -59
- config.json +43 -43
- tf_model.h5 +1 -1
README.md
CHANGED
@@ -1,59 +1,66 @@
|
|
1 |
-
---
|
2 |
-
library_name: transformers
|
3 |
-
license: mit
|
4 |
-
base_model: microsoft/layoutlm-base-uncased
|
5 |
-
tags:
|
6 |
-
- generated_from_keras_callback
|
7 |
-
model-index:
|
8 |
-
- name:
|
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 |
-
#
|
16 |
-
|
17 |
-
This model is a fine-tuned version of [microsoft/layoutlm-base-uncased](https://huggingface.co/microsoft/layoutlm-base-uncased) on an unknown dataset.
|
18 |
-
It achieves the following results on the evaluation set:
|
19 |
-
- Train Loss:
|
20 |
-
- Validation Loss:
|
21 |
-
- Train Overall Precision: 0.
|
22 |
-
- Train Overall Recall: 0.
|
23 |
-
- Train Overall F1: 0.
|
24 |
-
- Train Overall Accuracy: 0.
|
25 |
-
- Epoch:
|
26 |
-
|
27 |
-
## Model description
|
28 |
-
|
29 |
-
More information needed
|
30 |
-
|
31 |
-
## Intended uses & limitations
|
32 |
-
|
33 |
-
More information needed
|
34 |
-
|
35 |
-
## Training and evaluation data
|
36 |
-
|
37 |
-
More information needed
|
38 |
-
|
39 |
-
## Training procedure
|
40 |
-
|
41 |
-
### Training hyperparameters
|
42 |
-
|
43 |
-
The following hyperparameters were used during training:
|
44 |
-
- optimizer: {'name': 'AdamWeightDecay', 'learning_rate': np.float32(3e-05), 'decay': 0.0, 'beta_1': np.float32(0.9), 'beta_2': np.float32(0.999), 'epsilon': 1e-07, 'amsgrad': False, 'weight_decay_rate': 0.01}
|
45 |
-
- training_precision: mixed_float16
|
46 |
-
|
47 |
-
### Training results
|
48 |
-
|
49 |
-
| Train Loss | Validation Loss | Train Overall Precision | Train Overall Recall | Train Overall F1 | Train Overall Accuracy | Epoch |
|
50 |
-
|:----------:|:---------------:|:-----------------------:|:--------------------:|:----------------:|:----------------------:|:-----:|
|
51 |
-
| 1.6885 | 1.3544 | 0.2506 | 0.2534 | 0.2520 | 0.5600 | 0 |
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
library_name: transformers
|
3 |
+
license: mit
|
4 |
+
base_model: microsoft/layoutlm-base-uncased
|
5 |
+
tags:
|
6 |
+
- generated_from_keras_callback
|
7 |
+
model-index:
|
8 |
+
- name: layoutlm-funsd-tf
|
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 |
+
# layoutlm-funsd-tf
|
16 |
+
|
17 |
+
This model is a fine-tuned version of [microsoft/layoutlm-base-uncased](https://huggingface.co/microsoft/layoutlm-base-uncased) on an unknown dataset.
|
18 |
+
It achieves the following results on the evaluation set:
|
19 |
+
- Train Loss: 0.2409
|
20 |
+
- Validation Loss: 0.6905
|
21 |
+
- Train Overall Precision: 0.7213
|
22 |
+
- Train Overall Recall: 0.7858
|
23 |
+
- Train Overall F1: 0.7522
|
24 |
+
- Train Overall Accuracy: 0.7998
|
25 |
+
- Epoch: 7
|
26 |
+
|
27 |
+
## Model description
|
28 |
+
|
29 |
+
More information needed
|
30 |
+
|
31 |
+
## Intended uses & limitations
|
32 |
+
|
33 |
+
More information needed
|
34 |
+
|
35 |
+
## Training and evaluation data
|
36 |
+
|
37 |
+
More information needed
|
38 |
+
|
39 |
+
## Training procedure
|
40 |
+
|
41 |
+
### Training hyperparameters
|
42 |
+
|
43 |
+
The following hyperparameters were used during training:
|
44 |
+
- optimizer: {'name': 'AdamWeightDecay', 'learning_rate': np.float32(3e-05), 'decay': 0.0, 'beta_1': np.float32(0.9), 'beta_2': np.float32(0.999), 'epsilon': 1e-07, 'amsgrad': False, 'weight_decay_rate': 0.01}
|
45 |
+
- training_precision: mixed_float16
|
46 |
+
|
47 |
+
### Training results
|
48 |
+
|
49 |
+
| Train Loss | Validation Loss | Train Overall Precision | Train Overall Recall | Train Overall F1 | Train Overall Accuracy | Epoch |
|
50 |
+
|:----------:|:---------------:|:-----------------------:|:--------------------:|:----------------:|:----------------------:|:-----:|
|
51 |
+
| 1.6885 | 1.3544 | 0.2506 | 0.2534 | 0.2520 | 0.5600 | 0 |
|
52 |
+
| 1.1672 | 0.8949 | 0.5489 | 0.5996 | 0.5731 | 0.7115 | 1 |
|
53 |
+
| 0.7766 | 0.7345 | 0.6327 | 0.7476 | 0.6854 | 0.7633 | 2 |
|
54 |
+
| 0.5690 | 0.6435 | 0.6684 | 0.7727 | 0.7168 | 0.7936 | 3 |
|
55 |
+
| 0.4387 | 0.6493 | 0.7180 | 0.7792 | 0.7474 | 0.7962 | 4 |
|
56 |
+
| 0.3470 | 0.6380 | 0.7147 | 0.7893 | 0.7501 | 0.8020 | 5 |
|
57 |
+
| 0.2901 | 0.6569 | 0.7317 | 0.7868 | 0.7582 | 0.8059 | 6 |
|
58 |
+
| 0.2409 | 0.6905 | 0.7213 | 0.7858 | 0.7522 | 0.7998 | 7 |
|
59 |
+
|
60 |
+
|
61 |
+
### Framework versions
|
62 |
+
|
63 |
+
- Transformers 4.46.0
|
64 |
+
- TensorFlow 2.18.0
|
65 |
+
- Datasets 3.0.2
|
66 |
+
- Tokenizers 0.20.1
|
config.json
CHANGED
@@ -1,43 +1,43 @@
|
|
1 |
-
{
|
2 |
-
"_name_or_path": "microsoft/layoutlm-base-uncased",
|
3 |
-
"architectures": [
|
4 |
-
"LayoutLMForTokenClassification"
|
5 |
-
],
|
6 |
-
"attention_probs_dropout_prob": 0.1,
|
7 |
-
"hidden_act": "gelu",
|
8 |
-
"hidden_dropout_prob": 0.1,
|
9 |
-
"hidden_size": 768,
|
10 |
-
"id2label": {
|
11 |
-
"0": "O",
|
12 |
-
"1": "B-HEADER",
|
13 |
-
"2": "I-HEADER",
|
14 |
-
"3": "B-QUESTION",
|
15 |
-
"4": "I-QUESTION",
|
16 |
-
"5": "B-ANSWER",
|
17 |
-
"6": "I-ANSWER"
|
18 |
-
},
|
19 |
-
"initializer_range": 0.02,
|
20 |
-
"intermediate_size": 3072,
|
21 |
-
"label2id": {
|
22 |
-
"B-ANSWER": 5,
|
23 |
-
"B-HEADER": 1,
|
24 |
-
"B-QUESTION": 3,
|
25 |
-
"I-ANSWER": 6,
|
26 |
-
"I-HEADER": 2,
|
27 |
-
"I-QUESTION": 4,
|
28 |
-
"O": 0
|
29 |
-
},
|
30 |
-
"layer_norm_eps": 1e-12,
|
31 |
-
"max_2d_position_embeddings": 1024,
|
32 |
-
"max_position_embeddings": 512,
|
33 |
-
"model_type": "layoutlm",
|
34 |
-
"num_attention_heads": 12,
|
35 |
-
"num_hidden_layers": 12,
|
36 |
-
"output_past": true,
|
37 |
-
"pad_token_id": 0,
|
38 |
-
"position_embedding_type": "absolute",
|
39 |
-
"transformers_version": "4.46.0",
|
40 |
-
"type_vocab_size": 2,
|
41 |
-
"use_cache": true,
|
42 |
-
"vocab_size": 30522
|
43 |
-
}
|
|
|
1 |
+
{
|
2 |
+
"_name_or_path": "microsoft/layoutlm-base-uncased",
|
3 |
+
"architectures": [
|
4 |
+
"LayoutLMForTokenClassification"
|
5 |
+
],
|
6 |
+
"attention_probs_dropout_prob": 0.1,
|
7 |
+
"hidden_act": "gelu",
|
8 |
+
"hidden_dropout_prob": 0.1,
|
9 |
+
"hidden_size": 768,
|
10 |
+
"id2label": {
|
11 |
+
"0": "O",
|
12 |
+
"1": "B-HEADER",
|
13 |
+
"2": "I-HEADER",
|
14 |
+
"3": "B-QUESTION",
|
15 |
+
"4": "I-QUESTION",
|
16 |
+
"5": "B-ANSWER",
|
17 |
+
"6": "I-ANSWER"
|
18 |
+
},
|
19 |
+
"initializer_range": 0.02,
|
20 |
+
"intermediate_size": 3072,
|
21 |
+
"label2id": {
|
22 |
+
"B-ANSWER": 5,
|
23 |
+
"B-HEADER": 1,
|
24 |
+
"B-QUESTION": 3,
|
25 |
+
"I-ANSWER": 6,
|
26 |
+
"I-HEADER": 2,
|
27 |
+
"I-QUESTION": 4,
|
28 |
+
"O": 0
|
29 |
+
},
|
30 |
+
"layer_norm_eps": 1e-12,
|
31 |
+
"max_2d_position_embeddings": 1024,
|
32 |
+
"max_position_embeddings": 512,
|
33 |
+
"model_type": "layoutlm",
|
34 |
+
"num_attention_heads": 12,
|
35 |
+
"num_hidden_layers": 12,
|
36 |
+
"output_past": true,
|
37 |
+
"pad_token_id": 0,
|
38 |
+
"position_embedding_type": "absolute",
|
39 |
+
"transformers_version": "4.46.0",
|
40 |
+
"type_vocab_size": 2,
|
41 |
+
"use_cache": true,
|
42 |
+
"vocab_size": 30522
|
43 |
+
}
|
tf_model.h5
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
size 450829256
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:b9286a81272aa290094f83fd09eff39d61d949915fd0e7915cfd1aac94b4b96f
|
3 |
size 450829256
|