readme: ---
  tags:
  - generated_from_trainer
  datasets:
  - funsd
  model-index:
  - name: layoutlm-finetuned-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-finetuned-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.6806
  - Answer: {'precision': 0.7069154774972558, 'recall': 0.796044499381953, 'f1': 0.7488372093023256, 'number': 809}
  - Header: {'precision': 0.36752136752136755, 'recall': 0.36134453781512604, 'f1': 0.3644067796610169, 'number': 119}
  - Question: {'precision': 0.7866549604916594, 'recall': 0.8413145539906103, 'f1': 0.8130671506352087, 'number': 1065}
  - Overall Precision: 0.7305
  - Overall Recall: 0.7943
  - Overall F1: 0.7611
  - Overall Accuracy: 0.8085
  
  ## 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
  - 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.8023        | 1.0   | 10   | 1.6152          | {'precision': 0.009448818897637795, 'recall': 0.007416563658838072, 'f1': 0.008310249307479225, 'number': 809} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119}                                                  | {'precision': 0.12998266897746968, 'recall': 0.07042253521126761, 'f1': 0.09135200974421437, 'number': 1065} | 0.0668            | 0.0406         | 0.0505     | 0.3276           |
  | 1.4614        | 2.0   | 20   | 1.2547          | {'precision': 0.2211253701875617, 'recall': 0.276885043263288, 'f1': 0.24588364434687154, 'number': 809}       | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119}                                                  | {'precision': 0.43353028064992616, 'recall': 0.5511737089201878, 'f1': 0.4853245142620918, 'number': 1065}   | 0.3420            | 0.4069         | 0.3717     | 0.5926           |
  | 1.0795        | 3.0   | 30   | 0.9150          | {'precision': 0.49837486457204766, 'recall': 0.5686032138442522, 'f1': 0.5311778290993071, 'number': 809}      | {'precision': 0.04081632653061224, 'recall': 0.01680672268907563, 'f1': 0.023809523809523808, 'number': 119} | {'precision': 0.5953338696701529, 'recall': 0.6948356807511737, 'f1': 0.6412478336221837, 'number': 1065}    | 0.5427            | 0.6031         | 0.5713     | 0.7145           |
  | 0.8025        | 4.0   | 40   | 0.7686          | {'precision': 0.6056622851365016, 'recall': 0.7404202719406675, 'f1': 0.6662958843159066, 'number': 809}       | {'precision': 0.10975609756097561, 'recall': 0.07563025210084033, 'f1': 0.08955223880597014, 'number': 119}  | {'precision': 0.6737400530503979, 'recall': 0.7154929577464789, 'f1': 0.6939890710382515, 'number': 1065}    | 0.6222            | 0.6874         | 0.6532     | 0.7506           |
  | 0.6638        | 5.0   | 50   | 0.7034          | {'precision': 0.644535240040858, 'recall': 0.7799752781211372, 'f1': 0.7058165548098434, 'number': 809}        | {'precision': 0.23711340206185566, 'recall': 0.19327731092436976, 'f1': 0.21296296296296294, 'number': 119}  | {'precision': 0.7158992180712423, 'recall': 0.7737089201877935, 'f1': 0.7436823104693141, 'number': 1065}    | 0.6637            | 0.7416         | 0.7005     | 0.7841           |
  | 0.5567        | 6.0   | 60   | 0.6784          | {'precision': 0.6687435098650052, 'recall': 0.796044499381953, 'f1': 0.7268623024830699, 'number': 809}        | {'precision': 0.2857142857142857, 'recall': 0.2184873949579832, 'f1': 0.24761904761904763, 'number': 119}    | {'precision': 0.7