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.6820
  - Answer: {'precision': 0.7084257206208425, 'recall': 0.7898640296662547, 'f1': 0.7469316189362946, 'number': 809}
  - Header: {'precision': 0.2689655172413793, 'recall': 0.3277310924369748, 'f1': 0.2954545454545454, 'number': 119}
  - Question: {'precision': 0.7870619946091644, 'recall': 0.8225352112676056, 'f1': 0.8044077134986226, 'number': 1065}
  - Overall Precision: 0.7194
  - Overall Recall: 0.7797
  - Overall F1: 0.7484
  - Overall Accuracy: 0.8102
  
  ## 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.7857        | 1.0   | 10   | 1.5985          | {'precision': 0.009248554913294798, 'recall': 0.009888751545117428, 'f1': 0.00955794504181601, 'number': 809} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119}                                                 | {'precision': 0.1273972602739726, 'recall': 0.08732394366197183, 'f1': 0.10362116991643454, 'number': 1065} | 0.0633            | 0.0507         | 0.0563     | 0.3562           |
  | 1.4597        | 2.0   | 20   | 1.2331          | {'precision': 0.18717683557394002, 'recall': 0.22373300370828184, 'f1': 0.20382882882882883, 'number': 809}   | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119}                                                 | {'precision': 0.4439461883408072, 'recall': 0.5577464788732395, 'f1': 0.4943820224719101, 'number': 1065}   | 0.3362            | 0.3889         | 0.3606     | 0.6007           |
  | 1.0902        | 3.0   | 30   | 0.9489          | {'precision': 0.4371069182389937, 'recall': 0.515451174289246, 'f1': 0.47305728871242203, 'number': 809}      | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119}                                                 | {'precision': 0.6257615317667538, 'recall': 0.6751173708920187, 'f1': 0.6495031616982836, 'number': 1065}   | 0.5311            | 0.5700         | 0.5499     | 0.6910           |
  | 0.8339        | 4.0   | 40   | 0.7979          | {'precision': 0.5977366255144033, 'recall': 0.7181705809641533, 'f1': 0.652442448062886, 'number': 809}       | {'precision': 0.13513513513513514, 'recall': 0.08403361344537816, 'f1': 0.10362694300518135, 'number': 119} | {'precision': 0.6854545454545454, 'recall': 0.707981220657277, 'f1': 0.6965357967667436, 'number': 1065}    | 0.6267            | 0.6749         | 0.6499     | 0.7453           |
  | 0.6983        | 5.0   | 50   | 0.7659          | {'precision': 0.6392896781354052, 'recall': 0.7119901112484549, 'f1': 0.6736842105263159, 'number': 809}      | {'precision': 0.19626168224299065, 'recall': 0.17647058823529413, 'f1': 0.18584070796460178, 'number': 119} | {'precision': 0.6688102893890675, 'recall': 0.7812206572769953, 'f1': 0.7206582936336077, 'number': 1065}   | 0.6345            | 0.7170         | 0.6733     | 0.7610           |
  | 0.5815        | 6.0   | 60   | 0.6907          | {'precision': 0.6410256410256411, 'recall': 0.7725587144622992, 'f1': 0.7006726457399104, 'number': 809}      | {'precision': 0.23863636363636365, 'recall': 0.17647058823529413, 'f1': 0.20289855072463767, 'number': 119} | {'precision': 0.7027463651050081, 'recall': 0.816901408450704