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 [pvbhanuteja/layoutlm-funsd](https://huggingface.co/pvbhanuteja/layoutlm-funsd) on the funsd dataset.
  It achieves the following results on the evaluation set:
  - Loss: 1.1395
  - Answer: {'precision': 0.733934611048478, 'recall': 0.8046971569839307, 'f1': 0.767688679245283, 'number': 809}
  - Header: {'precision': 0.4066666666666667, 'recall': 0.5126050420168067, 'f1': 0.4535315985130111, 'number': 119}
  - Question: {'precision': 0.7980339588918678, 'recall': 0.8384976525821596, 'f1': 0.8177655677655677, 'number': 1065}
  - Overall Precision: 0.7444
  - Overall Recall: 0.8053
  - Overall F1: 0.7737
  - Overall Accuracy: 0.8054
  
  ## 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: 64
  - eval_batch_size: 32
  - seed: 42
  - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
  - lr_scheduler_type: linear
  - num_epochs: 100
  - mixed_precision_training: Native AMP
  
  ### Training results
  
  | Training Loss | Epoch | Step | Validation Loss | Answer                                                                                                   | Header                                                                                                      | Question                                                                                                  | Overall Precision | Overall Recall | Overall F1 | Overall Accuracy |
  |:-------------:|:-----:|:----:|:---------------:|:--------------------------------------------------------------------------------------------------------:|:-----------------------------------------------------------------------------------------------------------:|:---------------------------------------------------------------------------------------------------------:|:-----------------:|:--------------:|:----------:|:----------------:|
  | 0.7854        | 1.0   | 3    | 0.7718          | {'precision': 0.5876826722338204, 'recall': 0.695920889987639, 'f1': 0.6372382569326542, 'number': 809}  | {'precision': 0.1509433962264151, 'recall': 0.06722689075630252, 'f1': 0.09302325581395347, 'number': 119}  | {'precision': 0.6840731070496083, 'recall': 0.7380281690140845, 'f1': 0.7100271002710027, 'number': 1065} | 0.6282            | 0.6809         | 0.6535     | 0.7603           |
  | 0.6636        | 2.0   | 6    | 0.7427          | {'precision': 0.6303418803418803, 'recall': 0.7292954264524104, 'f1': 0.67621776504298, 'number': 809}   | {'precision': 0.2289156626506024, 'recall': 0.15966386554621848, 'f1': 0.18811881188118812, 'number': 119}  | {'precision': 0.6728295819935691, 'recall': 0.7859154929577464, 'f1': 0.7249891728020789, 'number': 1065} | 0.6390            | 0.7255         | 0.6795     | 0.7810           |
  | 0.5784        | 3.0   | 9    | 0.6996          | {'precision': 0.6334033613445378, 'recall': 0.7453646477132262, 'f1': 0.6848381601362863, 'number': 809} | {'precision': 0.23529411764705882, 'recall': 0.13445378151260504, 'f1': 0.17112299465240638, 'number': 119} | {'precision': 0.705161854768154, 'recall': 0.7568075117370892, 'f1': 0.7300724637681159, 'number': 1065}  | 0.6588            | 0.7150         | 0.6858     | 0.7843           |
  | 0.5096        | 4.0   | 12   | 0.7029          | {'precision': 0.6794150731158605, 'recall': 0.7466007416563659, 'f1': 0.7114252061248527, 'number': 809} | {'precision': 0.27380952380952384, 'recall': 0.19327731092436976, 'f1': 0.2266009852216749, 'number': 119}  | {'precision': 0.7071029529130087, 'recall': 0.831924882629108, 'f1': 0.7644521138912856, 'number': 1065}  | 0.6797            | 0.7592         | 0.7172     | 0.7928           |
  | 0.4932        | 5.0   | 15   | 0.6843          | {'precision': 0.6684266103484688, 'recall': 0.7824474660074165, 'f1': 0.7209567198177677, 'number': 809} | {'precision': 0.2653061224489796, 'recall': 0.2184873949579832, 'f1': 0.23963133640552997, 'number': 119}   | {'precision': 0.7347114556416882, 'recall': 0.8009389671361502, 'f1': 0.7663971248876907, 'number': 1065} | 0.6854            | 0.7587         | 0.7202     | 0.7976           |
  | 0.4558        | 6.0   | 18   | 0.6809          | {'precision': 0.6920492721164614, 'recall': 0.7639060568603214, 'f1': 0.7262044653349001, 'number': 809} | {'precision': 0.29245283018867924, 'recall': 0.2605042016806723, 'f1': 0.27555555555555555, 'number': 119}  | {'precision': 0.7493495229835212, 'recall': 0.8112676056338028, 'f1': 0.7790802524797115, 'number': 1065} | 0.7031           