
<!-- 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: 1.1493
- Answer: {'precision': 0.22598870056497175, 'recall': 0.19777503090234858, 'f1': 0.2109426499670402, 'number': 809}
- Header: {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119}
- Question: {'precision': 0.5350523771152297, 'recall': 0.6234741784037559, 'f1': 0.5758889852558543, 'number': 1065}
- Overall Precision: 0.4228
- Overall Recall: 0.4134
- Overall F1: 0.4181
- Overall Accuracy: 0.6373

## 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: 3

### Training results

| Training Loss | Epoch | Step | Validation Loss | Answer                                                                                                       | Header                                                      | Question                                                                                                    | Overall Precision | Overall Recall | Overall F1 | Overall Accuracy |
|:-------------:|:-----:|:----:|:---------------:|:------------------------------------------------------------------------------------------------------------:|:-----------------------------------------------------------:|:-----------------------------------------------------------------------------------------------------------:|:-----------------:|:--------------:|:----------:|:----------------:|
| 1.6256        | 1.0   | 10   | 1.4524          | {'precision': 0.05670665212649945, 'recall': 0.06427688504326329, 'f1': 0.060254924681344156, 'number': 809} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} | {'precision': 0.3111913357400722, 'recall': 0.40469483568075115, 'f1': 0.35183673469387755, 'number': 1065} | 0.2098            | 0.2423         | 0.2249     | 0.4826           |
| 1.3478        | 2.0   | 20   | 1.2324          | {'precision': 0.14285714285714285, 'recall': 0.1211372064276885, 'f1': 0.1311036789297659, 'number': 809}    | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} | {'precision': 0.4789156626506024, 'recall': 0.5971830985915493, 'f1': 0.5315503552026745, 'number': 1065}   | 0.3644            | 0.3683         | 0.3664     | 0.5977           |
| 1.155         | 3.0   | 30   | 1.1493          | {'precision': 0.22598870056497175, 'recall': 0.19777503090234858, 'f1': 0.2109426499670402, 'number': 809}   | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} | {'precision': 0.5350523771152297, 'recall': 0.6234741784037559, 'f1': 0.5758889852558543, 'number': 1065}   | 0.4228            | 0.4134         | 0.4181     | 0.6373           |


### Framework versions

- Transformers 4.28.0
- Pytorch 2.0.1+cpu
- Datasets 2.14.4
- Tokenizers 0.13.3

{"tags": ["generated_from_trainer"], "datasets": ["funsd"], "model-index": [{"name": "layoutlm-funsd", "results": []}]}
transformers pytorch tensorboard layoutlm token-classification generated_from_trainer dataset:funsd autotrain_compatible endpoints_compatible region:us