readme: ---
  tags:
  - generated_from_trainer
  datasets:
  - funsd
  model-index:
  - name: OCR-LM-v1
    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. -->
  
  # OCR-LM-v1
  
  This model is a fine-tuned version of [jinhybr/layoutlm-funsd-pytorch](https://huggingface.co/jinhybr/layoutlm-funsd-pytorch) on the funsd dataset.
  It achieves the following results on the evaluation set:
  - Loss: 1.1740
  - Answer: {'precision': 0.7201327433628318, 'recall': 0.8046971569839307, 'f1': 0.7600700525394046, 'number': 809}
  - Header: {'precision': 0.4246575342465753, 'recall': 0.5210084033613446, 'f1': 0.46792452830188674, 'number': 119}
  - Question: {'precision': 0.8236380424746076, 'recall': 0.8375586854460094, 'f1': 0.8305400372439479, 'number': 1065}
  - Overall Precision: 0.7525
  - Overall Recall: 0.8053
  - Overall F1: 0.7780
  - Overall Accuracy: 0.8146
  
  ## 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: 50
  
  ### Training results
  
  | Training Loss | Epoch | Step | Validation Loss | Answer                                                                                                   | Header                                                                                                      | Question                                                                                                  | Overall Precision | Overall Recall | Overall F1 | Overall Accuracy |
  |:-------------:|:-----:|:----:|:---------------:|:--------------------------------------------------------------------------------------------------------:|:-----------------------------------------------------------------------------------------------------------:|:---------------------------------------------------------------------------------------------------------:|:-----------------:|:--------------:|:----------:|:----------------:|
  | 0.3093        | 1.0   | 10   | 0.7358          | {'precision': 0.7053763440860215, 'recall': 0.8108776266996292, 'f1': 0.7544565842438183, 'number': 809} | {'precision': 0.33587786259541985, 'recall': 0.3697478991596639, 'f1': 0.35200000000000004, 'number': 119}  | {'precision': 0.7900900900900901, 'recall': 0.8234741784037559, 'f1': 0.8064367816091954, 'number': 1065} | 0.7264            | 0.7913         | 0.7574     | 0.8064           |
  | 0.2626        | 2.0   | 20   | 0.7389          | {'precision': 0.7217090069284064, 'recall': 0.7725587144622992, 'f1': 0.746268656716418, 'number': 809}  | {'precision': 0.33986928104575165, 'recall': 0.4369747899159664, 'f1': 0.3823529411764706, 'number': 119}   | {'precision': 0.7693661971830986, 'recall': 0.8206572769953052, 'f1': 0.79418446160836, 'number': 1065}   | 0.7197            | 0.7782         | 0.7478     | 0.7999           |
  | 0.2096        | 3.0   | 30   | 0.7834          | {'precision': 0.7417452830188679, 'recall': 0.7775030902348579, 'f1': 0.7592033796016897, 'number': 809} | {'precision': 0.3724137931034483, 'recall': 0.453781512605042, 'f1': 0.40909090909090906, 'number': 119}    | {'precision': 0.7889087656529516, 'recall': 0.828169014084507, 'f1': 0.8080622995877232, 'number': 1065}  | 0.7414            | 0.7852         | 0.7627     | 0.8003           |
  | 0.1755        | 4.0   | 40   | 0.7856          | {'precision': 0.6917372881355932, 'recall': 0.8071693448702101, 'f1': 0.7450085567598402, 'number': 809} | {'precision': 0.35135135135135137, 'recall': 0.4369747899159664, 'f1': 0.3895131086142322, 'number': 119}   | {'precision': 0.7893333333333333, 'recall': 0.8338028169014085, 'f1': 0.810958904109589, 'number': 1065}  | 0.7185            | 0.7993         | 0.7568     | 0.8005           |
  | 0.1421        | 5.0   | 50   | 0.8088          | {'precision': 0.7144444444444444, 'recall': 0.7948084054388134, 'f1': 0.7524868344060853, 'number': 809} | {'precision': 0.39436619718309857, 'recall': 0.47058823529411764, 'f1': 0.4291187739463601, 'number': 119}  | {'precision': 0.7915543575920935, 'recall': 0.8272300469483568, 'f1': 0.8089990817263545, 'number': 1065} | 0.7332            | 0.7928         | 0.7618     | 0.8014           |
  | 0.1235        | 6.0   | 60   | 0.8637          | {'precision': 0.7262313860252004, 'recall': 0.7836835599505563, 'f1': 0.7538644470868016, 'number': 809} | {'precision': 0.37410071942446044, 'recall': 0.4369747899159664, 'f1': 0.40310077519379844, 'number': 119}  | {'precision': 0.7994604316546763, 'recall': 0.8347417840375587, 'f1': 0.8167202572347267, 'number': 1065} | 0.7415            | 0.7903         | 0.7651     | 0.8026 