Commit
•
3747939
1
Parent(s):
75fa2d1
Upload TFLayoutLMForTokenClassification
Browse files- README.md +65 -65
- config.json +43 -43
README.md
CHANGED
@@ -1,65 +1,65 @@
|
|
1 |
-
---
|
2 |
-
license: mit
|
3 |
-
base_model: microsoft/layoutlm-base-uncased
|
4 |
-
tags:
|
5 |
-
- generated_from_keras_callback
|
6 |
-
model-index:
|
7 |
-
- name:
|
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 |
-
#
|
15 |
-
|
16 |
-
This model is a fine-tuned version of [microsoft/layoutlm-base-uncased](https://huggingface.co/microsoft/layoutlm-base-uncased) on an unknown dataset.
|
17 |
-
It achieves the following results on the evaluation set:
|
18 |
-
- Train Loss: 0.2395
|
19 |
-
- Validation Loss: 0.6723
|
20 |
-
- Train Overall Precision: 0.7269
|
21 |
-
- Train Overall Recall: 0.8013
|
22 |
-
- Train Overall F1: 0.7623
|
23 |
-
- Train Overall Accuracy: 0.8071
|
24 |
-
- Epoch: 7
|
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': 3e-05, 'decay': 0.0, 'beta_1': 0.9, 'beta_2': 0.999, 'epsilon': 1e-07, 'amsgrad': False, 'weight_decay_rate': 0.01}
|
44 |
-
- training_precision: mixed_float16
|
45 |
-
|
46 |
-
### Training results
|
47 |
-
|
48 |
-
| Train Loss | Validation Loss | Train Overall Precision | Train Overall Recall | Train Overall F1 | Train Overall Accuracy | Epoch |
|
49 |
-
|:----------:|:---------------:|:-----------------------:|:--------------------:|:----------------:|:----------------------:|:-----:|
|
50 |
-
| 1.6854 | 1.3883 | 0.2671 | 0.2494 | 0.2579 | 0.4942 | 0 |
|
51 |
-
| 1.1172 | 0.8636 | 0.5871 | 0.6392 | 0.6121 | 0.7287 | 1 |
|
52 |
-
| 0.7701 | 0.7274 | 0.6558 | 0.7170 | 0.6850 | 0.7690 | 2 |
|
53 |
-
| 0.5880 | 0.6978 | 0.6814 | 0.7501 | 0.7141 | 0.7747 | 3 |
|
54 |
-
| 0.4569 | 0.7022 | 0.6984 | 0.7612 | 0.7285 | 0.7710 | 4 |
|
55 |
-
| 0.3594 | 0.6280 | 0.7095 | 0.7903 | 0.7477 | 0.8118 | 5 |
|
56 |
-
| 0.3095 | 0.6566 | 0.7298 | 0.7832 | 0.7556 | 0.8085 | 6 |
|
57 |
-
| 0.2395 | 0.6723 | 0.7269 | 0.8013 | 0.7623 | 0.8071 | 7 |
|
58 |
-
|
59 |
-
|
60 |
-
### Framework versions
|
61 |
-
|
62 |
-
- Transformers 4.41.2
|
63 |
-
- TensorFlow 2.16.1
|
64 |
-
- Datasets 2.19.2
|
65 |
-
- Tokenizers 0.19.1
|
|
|
1 |
+
---
|
2 |
+
license: mit
|
3 |
+
base_model: microsoft/layoutlm-base-uncased
|
4 |
+
tags:
|
5 |
+
- generated_from_keras_callback
|
6 |
+
model-index:
|
7 |
+
- name: layoutlm-funsd-tf
|
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 |
+
# layoutlm-funsd-tf
|
15 |
+
|
16 |
+
This model is a fine-tuned version of [microsoft/layoutlm-base-uncased](https://huggingface.co/microsoft/layoutlm-base-uncased) on an unknown dataset.
|
17 |
+
It achieves the following results on the evaluation set:
|
18 |
+
- Train Loss: 0.2395
|
19 |
+
- Validation Loss: 0.6723
|
20 |
+
- Train Overall Precision: 0.7269
|
21 |
+
- Train Overall Recall: 0.8013
|
22 |
+
- Train Overall F1: 0.7623
|
23 |
+
- Train Overall Accuracy: 0.8071
|
24 |
+
- Epoch: 7
|
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': 3e-05, 'decay': 0.0, 'beta_1': 0.9, 'beta_2': 0.999, 'epsilon': 1e-07, 'amsgrad': False, 'weight_decay_rate': 0.01}
|
44 |
+
- training_precision: mixed_float16
|
45 |
+
|
46 |
+
### Training results
|
47 |
+
|
48 |
+
| Train Loss | Validation Loss | Train Overall Precision | Train Overall Recall | Train Overall F1 | Train Overall Accuracy | Epoch |
|
49 |
+
|:----------:|:---------------:|:-----------------------:|:--------------------:|:----------------:|:----------------------:|:-----:|
|
50 |
+
| 1.6854 | 1.3883 | 0.2671 | 0.2494 | 0.2579 | 0.4942 | 0 |
|
51 |
+
| 1.1172 | 0.8636 | 0.5871 | 0.6392 | 0.6121 | 0.7287 | 1 |
|
52 |
+
| 0.7701 | 0.7274 | 0.6558 | 0.7170 | 0.6850 | 0.7690 | 2 |
|
53 |
+
| 0.5880 | 0.6978 | 0.6814 | 0.7501 | 0.7141 | 0.7747 | 3 |
|
54 |
+
| 0.4569 | 0.7022 | 0.6984 | 0.7612 | 0.7285 | 0.7710 | 4 |
|
55 |
+
| 0.3594 | 0.6280 | 0.7095 | 0.7903 | 0.7477 | 0.8118 | 5 |
|
56 |
+
| 0.3095 | 0.6566 | 0.7298 | 0.7832 | 0.7556 | 0.8085 | 6 |
|
57 |
+
| 0.2395 | 0.6723 | 0.7269 | 0.8013 | 0.7623 | 0.8071 | 7 |
|
58 |
+
|
59 |
+
|
60 |
+
### Framework versions
|
61 |
+
|
62 |
+
- Transformers 4.41.2
|
63 |
+
- TensorFlow 2.16.1
|
64 |
+
- Datasets 2.19.2
|
65 |
+
- Tokenizers 0.19.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.41.2",
|
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.41.2",
|
40 |
+
"type_vocab_size": 2,
|
41 |
+
"use_cache": true,
|
42 |
+
"vocab_size": 30522
|
43 |
+
}
|