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.6843
  - Answer: {'precision': 0.6938997821350763, 'recall': 0.7873918417799752, 'f1': 0.7376954255935148, 'number': 809}
  - Header: {'precision': 0.27941176470588236, 'recall': 0.31932773109243695, 'f1': 0.2980392156862745, 'number': 119}
  - Question: {'precision': 0.7749562171628721, 'recall': 0.8309859154929577, 'f1': 0.8019936565473492, 'number': 1065}
  - Overall Precision: 0.7104
  - Overall Recall: 0.7827
  - Overall F1: 0.7448
  - Overall Accuracy: 0.8076
  
  ## 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.8035        | 1.0   | 10   | 1.6086          | {'precision': 0.007142857142857143, 'recall': 0.003708281829419036, 'f1': 0.004882017900732303, 'number': 809} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119}                                                 | {'precision': 0.07957559681697612, 'recall': 0.028169014084507043, 'f1': 0.04160887656033287, 'number': 1065} | 0.0414            | 0.0166         | 0.0237     | 0.3175           |
  | 1.4936        | 2.0   | 20   | 1.2735          | {'precision': 0.279126213592233, 'recall': 0.4264524103831891, 'f1': 0.3374083129584352, 'number': 809}        | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119}                                                 | {'precision': 0.4406651549508692, 'recall': 0.5474178403755868, 'f1': 0.48827470686767166, 'number': 1065}    | 0.3626            | 0.4656         | 0.4077     | 0.6074           |
  | 1.1259        | 3.0   | 30   | 0.9718          | {'precision': 0.47892074198988194, 'recall': 0.7021013597033374, 'f1': 0.569423558897243, 'number': 809}       | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119}                                                 | {'precision': 0.5904121110176619, 'recall': 0.6591549295774648, 'f1': 0.6228926353149955, 'number': 1065}     | 0.5336            | 0.6372         | 0.5808     | 0.6760           |
  | 0.8568        | 4.0   | 40   | 0.8421          | {'precision': 0.5595126522961574, 'recall': 0.7379480840543882, 'f1': 0.6364605543710021, 'number': 809}       | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119}                                                 | {'precision': 0.6669595782073814, 'recall': 0.7126760563380282, 'f1': 0.6890603722197005, 'number': 1065}     | 0.6059            | 0.6804         | 0.6410     | 0.7310           |
  | 0.7275        | 5.0   | 50   | 0.7430          | {'precision': 0.6401673640167364, 'recall': 0.7564894932014833, 'f1': 0.693484419263456, 'number': 809}        | {'precision': 0.12643678160919541, 'recall': 0.09243697478991597, 'f1': 0.10679611650485439, 'number': 119} | {'precision': 0.6825, 'recall': 0.7690140845070422, 'f1': 0.7231788079470199, 'number': 1065}                 | 0.6429            | 0.7235         | 0.6808     | 0.7727           |
  | 0.6109        | 6.0   | 60   | 0.6965          | {'precision': 0.6494736842105263, 'recall': 0.7626699629171817, 'f1': 0.7015349630471859, 'number': 809}       | {'precision': 0.125, 'recall': 0.09243697478991597, 'f1': 0.10628019323671498, 'number': 119}               | {'precision': 0.6780415430267063, 're