DThai commited on
Commit
c89e582
1 Parent(s): cafae9a

Upload TFLayoutLMForTokenClassification

Browse files
Files changed (3) hide show
  1. README.md +61 -0
  2. config.json +43 -0
  3. tf_model.h5 +3 -0
README.md ADDED
@@ -0,0 +1,61 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model: microsoft/layoutlm-base-uncased
3
+ tags:
4
+ - generated_from_keras_callback
5
+ model-index:
6
+ - name: layoutlm-funsd-tf
7
+ results: []
8
+ ---
9
+
10
+ <!-- This model card has been generated automatically according to the information Keras had access to. You should
11
+ probably proofread and complete it, then remove this comment. -->
12
+
13
+ # layoutlm-funsd-tf
14
+
15
+ This model is a fine-tuned version of [microsoft/layoutlm-base-uncased](https://huggingface.co/microsoft/layoutlm-base-uncased) on an unknown dataset.
16
+ It achieves the following results on the evaluation set:
17
+ - Train Loss: 0.4674
18
+ - Validation Loss: 0.6405
19
+ - Train Overall Precision: 0.7082
20
+ - Train Overall Recall: 0.7637
21
+ - Train Overall F1: 0.7349
22
+ - Train Overall Accuracy: 0.7984
23
+ - Epoch: 4
24
+
25
+ ## Model description
26
+
27
+ More information needed
28
+
29
+ ## Intended uses & limitations
30
+
31
+ More information needed
32
+
33
+ ## Training and evaluation data
34
+
35
+ More information needed
36
+
37
+ ## Training procedure
38
+
39
+ ### Training hyperparameters
40
+
41
+ The following hyperparameters were used during training:
42
+ - 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}
43
+ - training_precision: mixed_float16
44
+
45
+ ### Training results
46
+
47
+ | Train Loss | Validation Loss | Train Overall Precision | Train Overall Recall | Train Overall F1 | Train Overall Accuracy | Epoch |
48
+ |:----------:|:---------------:|:-----------------------:|:--------------------:|:----------------:|:----------------------:|:-----:|
49
+ | 1.7185 | 1.4324 | 0.2236 | 0.2805 | 0.2488 | 0.5123 | 0 |
50
+ | 1.1768 | 0.9053 | 0.5468 | 0.6744 | 0.6039 | 0.7257 | 1 |
51
+ | 0.7782 | 0.6968 | 0.6512 | 0.7250 | 0.6861 | 0.7760 | 2 |
52
+ | 0.5777 | 0.6506 | 0.6826 | 0.7682 | 0.7229 | 0.7924 | 3 |
53
+ | 0.4674 | 0.6405 | 0.7082 | 0.7637 | 0.7349 | 0.7984 | 4 |
54
+
55
+
56
+ ### Framework versions
57
+
58
+ - Transformers 4.33.3
59
+ - TensorFlow 2.13.0
60
+ - Datasets 2.14.5
61
+ - Tokenizers 0.13.3
config.json ADDED
@@ -0,0 +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.33.3",
40
+ "type_vocab_size": 2,
41
+ "use_cache": true,
42
+ "vocab_size": 30522
43
+ }
tf_model.h5 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:54b9479756d08b478228bfdf5eed408982ab9decc92cf68ff8a82642a6e97893
3
+ size 450829256