readme: ---
  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: 0.6724
  - Answer: {'precision': 0.7072368421052632, 'recall': 0.7972805933250927, 'f1': 0.7495642068564788, 'number': 809}
  - Header: {'precision': 0.3333333333333333, 'recall': 0.3697478991596639, 'f1': 0.350597609561753, 'number': 119}
  - Question: {'precision': 0.7901785714285714, 'recall': 0.8309859154929577, 'f1': 0.8100686498855836, 'number': 1065}
  - Overall Precision: 0.7274
  - Overall Recall: 0.7898
  - Overall F1: 0.7573
  - Overall Accuracy: 0.8170
  
  ## 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: 3e-05
  - 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.7705        | 1.0   | 10   | 1.5739          | {'precision': 0.010057471264367816, 'recall': 0.00865265760197775, 'f1': 0.00930232558139535, 'number': 809} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119}                                                | {'precision': 0.26591760299625467, 'recall': 0.13333333333333333, 'f1': 0.17761100687929957, 'number': 1065} | 0.1211            | 0.0748         | 0.0925     | 0.3598           |
  | 1.4468        | 2.0   | 20   | 1.2327          | {'precision': 0.25151148730350664, 'recall': 0.25710754017305315, 'f1': 0.2542787286063569, 'number': 809}   | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119}                                                | {'precision': 0.4251316779533484, 'recall': 0.5305164319248826, 'f1': 0.4720133667502089, 'number': 1065}    | 0.3585            | 0.3879         | 0.3726     | 0.5921           |
  | 1.1103        | 3.0   | 30   | 0.9608          | {'precision': 0.4880694143167028, 'recall': 0.5562422744128553, 'f1': 0.5199306759098786, 'number': 809}     | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119}                                                | {'precision': 0.5613598673300166, 'recall': 0.6356807511737089, 'f1': 0.5962131219726994, 'number': 1065}    | 0.5257            | 0.5655         | 0.5448     | 0.7058           |
  | 0.8476        | 4.0   | 40   | 0.7875          | {'precision': 0.5821325648414986, 'recall': 0.7490729295426453, 'f1': 0.6551351351351351, 'number': 809}     | {'precision': 0.1702127659574468, 'recall': 0.06722689075630252, 'f1': 0.09638554216867469, 'number': 119} | {'precision': 0.6254071661237784, 'recall': 0.7211267605633803, 'f1': 0.6698648059310947, 'number': 1065}    | 0.5967            | 0.6934         | 0.6414     | 0.7538           |
  | 0.6698        | 5.0   | 50   | 0.6948          | {'precision': 0.6421923474663909, 'recall': 0.7676143386897404, 'f1': 0.6993243243243243, 'number': 809}     | {'precision': 0.3424657534246575, 'recall': 0.21008403361344538, 'f1': 0.2604166666666667, 'number': 119}  | {'precision': 0.6873977086743044, 'recall': 0.7887323943661971, 'f1': 0.7345867949278532, 'number': 1065}    | 0.6569            | 0.7456         | 0.6985     | 0.7860           |
  | 0.554         | 6.0   | 60   | 0.6717          | {'precision': 0.6506410256410257, 'recall': 0.7527812113720643, 'f1': 0.6979942693409743, 'number': 809}     | {'precision': 0.3448275862068966, 'recall': 0.25210084033613445, 'f1': 0.2912621359223301, 'number': 119}  | {'precision': 0.716821639898563, 'recall': 0.7962441314553991, 'f1': 0.7544483985765124, 'number': 1065}     |