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.7158
  - Answer: {'precision': 0.7149220489977728, 'recall': 0.7935723114956736, 'f1': 0.7521968365553603, 'number': 809}
  - Header: {'precision': 0.3063063063063063, 'recall': 0.2857142857142857, 'f1': 0.2956521739130435, 'number': 119}
  - Question: {'precision': 0.7892857142857143, 'recall': 0.8300469483568075, 'f1': 0.8091533180778031, 'number': 1065}
  - Overall Precision: 0.7327
  - Overall Recall: 0.7827
  - Overall F1: 0.7569
  - Overall Accuracy: 0.8108
  
  ## 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.8132        | 1.0   | 10   | 1.6191          | {'precision': 0.015122873345935728, 'recall': 0.019777503090234856, 'f1': 0.01713979646491698, 'number': 809} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119}                                                 | {'precision': 0.1685508735868448, 'recall': 0.1539906103286385, 'f1': 0.16094210009813542, 'number': 1065} | 0.0886            | 0.0903         | 0.0895     | 0.3534           |
  | 1.4783        | 2.0   | 20   | 1.2483          | {'precision': 0.12857142857142856, 'recall': 0.12237330037082818, 'f1': 0.1253958201393287, 'number': 809}    | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119}                                                 | {'precision': 0.4541955350269438, 'recall': 0.5539906103286385, 'f1': 0.4991539763113368, 'number': 1065}  | 0.3330            | 0.3457         | 0.3392     | 0.5682           |
  | 1.1072        | 3.0   | 30   | 0.9718          | {'precision': 0.42777155655095184, 'recall': 0.4721878862793572, 'f1': 0.4488836662749706, 'number': 809}     | {'precision': 0.04, 'recall': 0.008403361344537815, 'f1': 0.01388888888888889, 'number': 119}               | {'precision': 0.6266205704407951, 'recall': 0.6807511737089202, 'f1': 0.6525652565256526, 'number': 1065}  | 0.5340            | 0.5559         | 0.5447     | 0.7070           |
  | 0.8444        | 4.0   | 40   | 0.7957          | {'precision': 0.6296296296296297, 'recall': 0.7354758961681088, 'f1': 0.6784492588369442, 'number': 809}      | {'precision': 0.19230769230769232, 'recall': 0.08403361344537816, 'f1': 0.11695906432748539, 'number': 119} | {'precision': 0.6831168831168831, 'recall': 0.7408450704225352, 'f1': 0.7108108108108109, 'number': 1065}  | 0.6478            | 0.6994         | 0.6726     | 0.7651           |
  | 0.6845        | 5.0   | 50   | 0.7443          | {'precision': 0.6530612244897959, 'recall': 0.7515451174289246, 'f1': 0.6988505747126437, 'number': 809}      | {'precision': 0.23684210526315788, 'recall': 0.15126050420168066, 'f1': 0.1846153846153846, 'number': 119}  | {'precision': 0.7318181818181818, 'recall': 0.755868544600939, 'f1': 0.74364896073903, 'number': 1065}     | 0.6792            | 0.7180         | 0.6980     | 0.7736           |
  | 0.5597        | 6.0   | 60   | 0.6918          | {'precision': 0.6673706441393875, 'recall': 0.7812113720642769, 'f1': 0.7198177676537586, 'number': 809}      | {'precision': 0.2857142857142857, 'recall': 0.15126050420168066, 'f1': 0.1978021978021978, 'number': 119}   | {'precision': 0.7344150298889838, 'recall': 0.8075117370892019, 'f1'