File size: 9,342 Bytes
4eba019
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
ec6c57b
 
4eba019
ec6c57b
 
 
 
 
4eba019
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
ec6c57b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4eba019
 
 
 
 
ec6c57b
a8f71d2
4eba019
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
---
base_model: microsoft/layoutlm-base-uncased
tags:
- generated_from_trainer
datasets:
- funsd
model-index:
- name: layoutlm-funsd
  results: []
---

<!-- This model card has been generated automatically according to the information the Trainer had access to. You
should probably proofread and complete it, then remove this comment. -->

# layoutlm-funsd

This model is a fine-tuned version of [microsoft/layoutlm-base-uncased](https://huggingface.co/microsoft/layoutlm-base-uncased) on the funsd dataset.
It achieves the following results on the evaluation set:
- Loss: 1.3057
- Answer: {'precision': 0.09480519480519481, 'recall': 0.09023485784919653, 'f1': 0.09246358454718177, 'number': 809}
- Header: {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119}
- Question: {'precision': 0.4032534246575342, 'recall': 0.4422535211267606, 'f1': 0.4218540080609046, 'number': 1065}
- Overall Precision: 0.2807
- Overall Recall: 0.2730
- Overall F1: 0.2768
- Overall Accuracy: 0.5691

## Model description

More information needed

## Intended uses & limitations

More information needed

## Training and evaluation data

More information needed

## Training procedure

### Training hyperparameters

The following hyperparameters were used during training:
- learning_rate: 5e-06
- train_batch_size: 16
- eval_batch_size: 8
- seed: 42
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: linear
- num_epochs: 15

### Training results

| Training Loss | Epoch | Step | Validation Loss | Answer                                                                                                         | Header                                                                                                         | Question                                                                                                     | Overall Precision | Overall Recall | Overall F1 | Overall Accuracy |
|:-------------:|:-----:|:----:|:---------------:|:--------------------------------------------------------------------------------------------------------------:|:--------------------------------------------------------------------------------------------------------------:|:------------------------------------------------------------------------------------------------------------:|:-----------------:|:--------------:|:----------:|:----------------:|
| 1.9048        | 1.0   | 10   | 1.8492          | {'precision': 0.02683982683982684, 'recall': 0.07663782447466007, 'f1': 0.039756332157742866, 'number': 809}   | {'precision': 0.003424657534246575, 'recall': 0.008403361344537815, 'f1': 0.004866180048661801, 'number': 119} | {'precision': 0.08558262014483213, 'recall': 0.12206572769953052, 'f1': 0.10061919504643962, 'number': 1065} | 0.0468            | 0.0968         | 0.0631     | 0.2625           |
| 1.8261        | 2.0   | 20   | 1.7805          | {'precision': 0.02488425925925926, 'recall': 0.05315203955500618, 'f1': 0.03389830508474576, 'number': 809}    | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119}                                                    | {'precision': 0.11639344262295082, 'recall': 0.13333333333333333, 'f1': 0.12428884026258205, 'number': 1065} | 0.0620            | 0.0928         | 0.0744     | 0.3314           |
| 1.7557        | 3.0   | 30   | 1.7197          | {'precision': 0.018808777429467086, 'recall': 0.029666254635352288, 'f1': 0.02302158273381295, 'number': 809}  | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119}                                                    | {'precision': 0.15336134453781514, 'recall': 0.13708920187793427, 'f1': 0.14476945959345563, 'number': 1065} | 0.0763            | 0.0853         | 0.0805     | 0.3579           |
| 1.7002        | 4.0   | 40   | 1.6648          | {'precision': 0.019029495718363463, 'recall': 0.024721878862793572, 'f1': 0.02150537634408602, 'number': 809}  | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119}                                                    | {'precision': 0.19602977667493796, 'recall': 0.14835680751173708, 'f1': 0.16889363976483165, 'number': 1065} | 0.0959            | 0.0893         | 0.0925     | 0.3775           |
| 1.645         | 5.0   | 50   | 1.6121          | {'precision': 0.019801980198019802, 'recall': 0.024721878862793572, 'f1': 0.021990104452996154, 'number': 809} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119}                                                    | {'precision': 0.22172452407614782, 'recall': 0.18591549295774648, 'f1': 0.20224719101123598, 'number': 1065} | 0.1146            | 0.1094         | 0.1119     | 0.4091           |
| 1.5951        | 6.0   | 60   | 1.5596          | {'precision': 0.029411764705882353, 'recall': 0.037082818294190356, 'f1': 0.032804811372334604, 'number': 809} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119}                                                    | {'precision': 0.23694779116465864, 'recall': 0.2215962441314554, 'f1': 0.2290150412421155, 'number': 1065}   | 0.1319            | 0.1335         | 0.1327     | 0.4421           |
| 1.5418        | 7.0   | 70   | 1.5109          | {'precision': 0.040755467196819085, 'recall': 0.05067985166872682, 'f1': 0.04517906336088154, 'number': 809}   | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119}                                                    | {'precision': 0.27926267281105993, 'recall': 0.28450704225352114, 'f1': 0.2818604651162791, 'number': 1065}  | 0.1645            | 0.1726         | 0.1685     | 0.4719           |
| 1.4954        | 8.0   | 80   | 1.4653          | {'precision': 0.050359712230215826, 'recall': 0.06056860321384425, 'f1': 0.05499438832772166, 'number': 809}   | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119}                                                    | {'precision': 0.3016421780466724, 'recall': 0.3276995305164319, 'f1': 0.31413141314131415, 'number': 1065}   | 0.1869            | 0.1997         | 0.1931     | 0.4973           |
| 1.4558        | 9.0   | 90   | 1.4245          | {'precision': 0.054140127388535034, 'recall': 0.0630407911001236, 'f1': 0.05825242718446602, 'number': 809}    | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119}                                                    | {'precision': 0.3177966101694915, 'recall': 0.352112676056338, 'f1': 0.3340757238307349, 'number': 1065}     | 0.2008            | 0.2137         | 0.2070     | 0.5168           |
| 1.4126        | 10.0  | 100  | 1.3893          | {'precision': 0.07432432432432433, 'recall': 0.0815822002472188, 'f1': 0.07778432527990571, 'number': 809}     | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119}                                                    | {'precision': 0.33669185558354325, 'recall': 0.37652582159624415, 'f1': 0.3554964539007092, 'number': 1065}  | 0.2246            | 0.2343         | 0.2294     | 0.5339           |
| 1.3759        | 11.0  | 110  | 1.3592          | {'precision': 0.08333333333333333, 'recall': 0.0865265760197775, 'f1': 0.08489993935718616, 'number': 809}     | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119}                                                    | {'precision': 0.3618807724601176, 'recall': 0.40469483568075115, 'f1': 0.38209219858156024, 'number': 1065}  | 0.2467            | 0.2514         | 0.2490     | 0.5470           |
| 1.3663        | 12.0  | 120  | 1.3358          | {'precision': 0.08531994981179424, 'recall': 0.08405438813349815, 'f1': 0.08468244084682441, 'number': 809}    | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119}                                                    | {'precision': 0.37638062871707734, 'recall': 0.415962441314554, 'f1': 0.39518287243532557, 'number': 1065}   | 0.2589            | 0.2564         | 0.2576     | 0.5545           |
| 1.3323        | 13.0  | 130  | 1.3192          | {'precision': 0.0916030534351145, 'recall': 0.08899876390605686, 'f1': 0.090282131661442, 'number': 809}       | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119}                                                    | {'precision': 0.38649789029535864, 'recall': 0.4300469483568075, 'f1': 0.40711111111111115, 'number': 1065}  | 0.2689            | 0.2659         | 0.2674     | 0.5635           |
| 1.3268        | 14.0  | 140  | 1.3094          | {'precision': 0.09585492227979274, 'recall': 0.09147095179233622, 'f1': 0.09361163820366855, 'number': 809}    | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119}                                                    | {'precision': 0.3974358974358974, 'recall': 0.43661971830985913, 'f1': 0.4161073825503355, 'number': 1065}   | 0.2775            | 0.2704         | 0.2740     | 0.5671           |
| 1.2988        | 15.0  | 150  | 1.3057          | {'precision': 0.09480519480519481, 'recall': 0.09023485784919653, 'f1': 0.09246358454718177, 'number': 809}    | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119}                                                    | {'precision': 0.4032534246575342, 'recall': 0.4422535211267606, 'f1': 0.4218540080609046, 'number': 1065}    | 0.2807            | 0.2730         | 0.2768     | 0.5691           |


### Framework versions

- Transformers 4.31.0
- Pytorch 2.0.1+cu117
- Datasets 2.14.4
- Tokenizers 0.13.3