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.7243
  - Answer: {'precision': 0.7051835853131749, 'recall': 0.8071693448702101, 'f1': 0.7527377521613834, 'number': 809}
  - Header: {'precision': 0.3706896551724138, 'recall': 0.36134453781512604, 'f1': 0.36595744680851067, 'number': 119}
  - Question: {'precision': 0.8041704442429737, 'recall': 0.8328638497652582, 'f1': 0.8182656826568265, 'number': 1065}
  - Overall Precision: 0.7380
  - Overall Recall: 0.7943
  - Overall F1: 0.7651
  - Overall Accuracy: 0.8003
  
  ## 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: 128
  - eval_batch_size: 64
  - seed: 42
  - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
  - lr_scheduler_type: linear
  - num_epochs: 50
  - mixed_precision_training: Native AMP
  
  ### Training results
  
  | Training Loss | Epoch | Step | Validation Loss | Answer                                                                                                     | Header                                                                                                        | Question                                                                                                  | Overall Precision | Overall Recall | Overall F1 | Overall Accuracy |
  |:-------------:|:-----:|:----:|:---------------:|:----------------------------------------------------------------------------------------------------------:|:-------------------------------------------------------------------------------------------------------------:|:---------------------------------------------------------------------------------------------------------:|:-----------------:|:--------------:|:----------:|:----------------:|
  | 1.1725        | 1.0   | 2    | 1.0951          | {'precision': 0.33885350318471336, 'recall': 0.3288009888751545, 'f1': 0.33375156838143033, 'number': 809} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119}                                                   | {'precision': 0.559967585089141, 'recall': 0.6488262910798122, 'f1': 0.6011309264897782, 'number': 1065}  | 0.4738            | 0.4802         | 0.4769     | 0.6364           |
  | 1.0154        | 2.0   | 4    | 0.9732          | {'precision': 0.4147521160822249, 'recall': 0.42398022249690975, 'f1': 0.4193154034229829, 'number': 809}  | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119}                                                   | {'precision': 0.5925020374898126, 'recall': 0.6826291079812207, 'f1': 0.6343804537521816, 'number': 1065} | 0.5184            | 0.5369         | 0.5275     | 0.6891           |
  | 0.9362        | 3.0   | 6    | 0.8900          | {'precision': 0.5035714285714286, 'recall': 0.522867737948084, 'f1': 0.5130382049727107, 'number': 809}    | {'precision': 0.06896551724137931, 'recall': 0.01680672268907563, 'f1': 0.027027027027027025, 'number': 119}  | {'precision': 0.6452159187129551, 'recall': 0.7154929577464789, 'f1': 0.678539626001781, 'number': 1065}  | 0.5790            | 0.5956         | 0.5872     | 0.7197           |
  | 0.8256        | 4.0   | 8    | 0.8352          | {'precision': 0.5638179800221975, 'recall': 0.6279357231149567, 'f1': 0.5941520467836258, 'number': 809}   | {'precision': 0.06976744186046512, 'recall': 0.025210084033613446, 'f1': 0.037037037037037035, 'number': 119} | {'precision': 0.6519607843137255, 'recall': 0.7492957746478873, 'f1': 0.6972477064220184, 'number': 1065} | 0.6038            | 0.6568         | 0.6292     | 0.7434           |
  | 0.7591        | 5.0   | 10   | 0.7736          | {'precision': 0.6031914893617021, 'recall': 0.7008652657601978, 'f1': 0.6483704974271013, 'number': 809}   | {'precision': 0.10204081632653061, 'recall': 0.04201680672268908, 'f1': 0.05952380952380952, 'number': 119}   | {'precision': 0.6701612903225806, 'recall': 0.780281690140845, 'f1': 0.7210412147505423, 'number': 1065}  | 0.6294            | 0.7040         | 0.6646     | 0.7644           |
  | 0.7242        | 6.0   | 12   | 0.7291          | {'precision': 0.5970619097586569, 'recall': 0.7033374536464772, 'f1': 0.6458569807037458, 'number': 809}   | {'precision': 0.12727272727272726, 'recall': 0.058823529411764705, 'f1': 0.08045977011494251, 'number': 119}  | {'precision': 0.7053264604810997, 'recall': 0.7708920187793428, 'f1': 0.7366532