navodPeiris commited on
Commit
f4e0e48
·
verified ·
1 Parent(s): afc5991

End of training

Browse files
README.md CHANGED
@@ -1,3 +1,70 @@
1
- ---
2
- license: mit
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ library_name: transformers
3
+ license: cc-by-nc-sa-4.0
4
+ base_model: microsoft/layoutlmv2-base-uncased
5
+ tags:
6
+ - generated_from_trainer
7
+ metrics:
8
+ - accuracy
9
+ model-index:
10
+ - name: layoutlmv2-document-classifier
11
+ results: []
12
+ ---
13
+
14
+ <!-- This model card has been generated automatically according to the information the Trainer had access to. You
15
+ should probably proofread and complete it, then remove this comment. -->
16
+
17
+ # layoutlmv2-document-classifier
18
+
19
+ This model is a fine-tuned version of [microsoft/layoutlmv2-base-uncased](https://huggingface.co/microsoft/layoutlmv2-base-uncased) on an unknown dataset.
20
+ It achieves the following results on the evaluation set:
21
+ - Loss: 0.0008
22
+ - Accuracy: 1.0
23
+
24
+ ## Model description
25
+
26
+ More information needed
27
+
28
+ ## Intended uses & limitations
29
+
30
+ More information needed
31
+
32
+ ## Training and evaluation data
33
+
34
+ More information needed
35
+
36
+ ## Training procedure
37
+
38
+ ### Training hyperparameters
39
+
40
+ The following hyperparameters were used during training:
41
+ - learning_rate: 5e-05
42
+ - train_batch_size: 8
43
+ - eval_batch_size: 8
44
+ - seed: 42
45
+ - optimizer: Use OptimizerNames.ADAMW_TORCH with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
46
+ - lr_scheduler_type: linear
47
+ - num_epochs: 1
48
+
49
+ ### Training results
50
+
51
+ | Training Loss | Epoch | Step | Validation Loss | Accuracy |
52
+ |:-------------:|:------:|:----:|:---------------:|:--------:|
53
+ | 0.7722 | 0.0970 | 26 | 0.2249 | 0.9216 |
54
+ | 0.0828 | 0.1940 | 52 | 0.0452 | 0.9907 |
55
+ | 0.026 | 0.2910 | 78 | 0.0459 | 0.9907 |
56
+ | 0.0265 | 0.3881 | 104 | 0.0267 | 0.9907 |
57
+ | 0.0263 | 0.4851 | 130 | 0.0068 | 1.0 |
58
+ | 0.008 | 0.5821 | 156 | 0.0026 | 1.0 |
59
+ | 0.0023 | 0.6791 | 182 | 0.0014 | 1.0 |
60
+ | 0.0014 | 0.7761 | 208 | 0.0009 | 1.0 |
61
+ | 0.0011 | 0.8731 | 234 | 0.0008 | 1.0 |
62
+ | 0.0012 | 0.9701 | 260 | 0.0008 | 1.0 |
63
+
64
+
65
+ ### Framework versions
66
+
67
+ - Transformers 4.51.3
68
+ - Pytorch 2.6.0+cu124
69
+ - Datasets 3.6.0
70
+ - Tokenizers 0.21.1
config.json ADDED
@@ -0,0 +1,146 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "LayoutLMv2ForSequenceClassification"
4
+ ],
5
+ "attention_probs_dropout_prob": 0.1,
6
+ "convert_sync_batchnorm": true,
7
+ "coordinate_size": 128,
8
+ "detectron2_config_args": {
9
+ "MODEL.ANCHOR_GENERATOR.SIZES": [
10
+ [
11
+ 32
12
+ ],
13
+ [
14
+ 64
15
+ ],
16
+ [
17
+ 128
18
+ ],
19
+ [
20
+ 256
21
+ ],
22
+ [
23
+ 512
24
+ ]
25
+ ],
26
+ "MODEL.BACKBONE.NAME": "build_resnet_fpn_backbone",
27
+ "MODEL.FPN.IN_FEATURES": [
28
+ "res2",
29
+ "res3",
30
+ "res4",
31
+ "res5"
32
+ ],
33
+ "MODEL.MASK_ON": true,
34
+ "MODEL.PIXEL_STD": [
35
+ 57.375,
36
+ 57.12,
37
+ 58.395
38
+ ],
39
+ "MODEL.POST_NMS_TOPK_TEST": 1000,
40
+ "MODEL.RESNETS.ASPECT_RATIOS": [
41
+ [
42
+ 0.5,
43
+ 1.0,
44
+ 2.0
45
+ ]
46
+ ],
47
+ "MODEL.RESNETS.DEPTH": 101,
48
+ "MODEL.RESNETS.NUM_GROUPS": 32,
49
+ "MODEL.RESNETS.OUT_FEATURES": [
50
+ "res2",
51
+ "res3",
52
+ "res4",
53
+ "res5"
54
+ ],
55
+ "MODEL.RESNETS.SIZES": [
56
+ [
57
+ 32
58
+ ],
59
+ [
60
+ 64
61
+ ],
62
+ [
63
+ 128
64
+ ],
65
+ [
66
+ 256
67
+ ],
68
+ [
69
+ 512
70
+ ]
71
+ ],
72
+ "MODEL.RESNETS.STRIDE_IN_1X1": false,
73
+ "MODEL.RESNETS.WIDTH_PER_GROUP": 8,
74
+ "MODEL.ROI_BOX_HEAD.NAME": "FastRCNNConvFCHead",
75
+ "MODEL.ROI_BOX_HEAD.NUM_FC": 2,
76
+ "MODEL.ROI_BOX_HEAD.POOLER_RESOLUTION": 14,
77
+ "MODEL.ROI_HEADS.IN_FEATURES": [
78
+ "p2",
79
+ "p3",
80
+ "p4",
81
+ "p5"
82
+ ],
83
+ "MODEL.ROI_HEADS.NAME": "StandardROIHeads",
84
+ "MODEL.ROI_HEADS.NUM_CLASSES": 5,
85
+ "MODEL.ROI_MASK_HEAD.NAME": "MaskRCNNConvUpsampleHead",
86
+ "MODEL.ROI_MASK_HEAD.NUM_CONV": 4,
87
+ "MODEL.ROI_MASK_HEAD.POOLER_RESOLUTION": 7,
88
+ "MODEL.RPN.IN_FEATURES": [
89
+ "p2",
90
+ "p3",
91
+ "p4",
92
+ "p5",
93
+ "p6"
94
+ ],
95
+ "MODEL.RPN.POST_NMS_TOPK_TRAIN": 1000,
96
+ "MODEL.RPN.PRE_NMS_TOPK_TEST": 1000,
97
+ "MODEL.RPN.PRE_NMS_TOPK_TRAIN": 2000
98
+ },
99
+ "fast_qkv": true,
100
+ "gradient_checkpointing": false,
101
+ "has_relative_attention_bias": true,
102
+ "has_spatial_attention_bias": true,
103
+ "has_visual_segment_embedding": false,
104
+ "hidden_act": "gelu",
105
+ "hidden_dropout_prob": 0.1,
106
+ "hidden_size": 768,
107
+ "id2label": {
108
+ "0": "inventory_monthly",
109
+ "1": "inventory_monthly_category",
110
+ "2": "invoices",
111
+ "3": "purchase_orders",
112
+ "4": "shipping_orders"
113
+ },
114
+ "image_feature_pool_shape": [
115
+ 7,
116
+ 7,
117
+ 256
118
+ ],
119
+ "initializer_range": 0.02,
120
+ "intermediate_size": 3072,
121
+ "label2id": {
122
+ "inventory_monthly": 0,
123
+ "inventory_monthly_category": 1,
124
+ "invoices": 2,
125
+ "purchase_orders": 3,
126
+ "shipping_orders": 4
127
+ },
128
+ "layer_norm_eps": 1e-12,
129
+ "max_2d_position_embeddings": 1024,
130
+ "max_position_embeddings": 512,
131
+ "max_rel_2d_pos": 256,
132
+ "max_rel_pos": 128,
133
+ "model_type": "layoutlmv2",
134
+ "num_attention_heads": 12,
135
+ "num_hidden_layers": 12,
136
+ "output_past": true,
137
+ "pad_token_id": 0,
138
+ "problem_type": "single_label_classification",
139
+ "rel_2d_pos_bins": 64,
140
+ "rel_pos_bins": 32,
141
+ "shape_size": 128,
142
+ "torch_dtype": "float32",
143
+ "transformers_version": "4.51.3",
144
+ "type_vocab_size": 2,
145
+ "vocab_size": 30522
146
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:611317614566ea9c12daf33a03dd1b932205869252190ad3ac0a6d11a77b7fc3
3
+ size 802090508
preprocessor_config.json ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "apply_ocr": true,
3
+ "do_resize": true,
4
+ "image_processor_type": "LayoutLMv2ImageProcessor",
5
+ "ocr_lang": null,
6
+ "processor_class": "LayoutLMv2Processor",
7
+ "resample": 2,
8
+ "size": {
9
+ "height": 224,
10
+ "width": 224
11
+ },
12
+ "tesseract_config": ""
13
+ }
special_tokens_map.json ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "cls_token": {
3
+ "content": "[CLS]",
4
+ "lstrip": false,
5
+ "normalized": false,
6
+ "rstrip": false,
7
+ "single_word": false
8
+ },
9
+ "mask_token": {
10
+ "content": "[MASK]",
11
+ "lstrip": false,
12
+ "normalized": false,
13
+ "rstrip": false,
14
+ "single_word": false
15
+ },
16
+ "pad_token": {
17
+ "content": "[PAD]",
18
+ "lstrip": false,
19
+ "normalized": false,
20
+ "rstrip": false,
21
+ "single_word": false
22
+ },
23
+ "sep_token": {
24
+ "content": "[SEP]",
25
+ "lstrip": false,
26
+ "normalized": false,
27
+ "rstrip": false,
28
+ "single_word": false
29
+ },
30
+ "unk_token": {
31
+ "content": "[UNK]",
32
+ "lstrip": false,
33
+ "normalized": false,
34
+ "rstrip": false,
35
+ "single_word": false
36
+ }
37
+ }
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
@@ -0,0 +1,80 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "added_tokens_decoder": {
3
+ "0": {
4
+ "content": "[PAD]",
5
+ "lstrip": false,
6
+ "normalized": false,
7
+ "rstrip": false,
8
+ "single_word": false,
9
+ "special": true
10
+ },
11
+ "100": {
12
+ "content": "[UNK]",
13
+ "lstrip": false,
14
+ "normalized": false,
15
+ "rstrip": false,
16
+ "single_word": false,
17
+ "special": true
18
+ },
19
+ "101": {
20
+ "content": "[CLS]",
21
+ "lstrip": false,
22
+ "normalized": false,
23
+ "rstrip": false,
24
+ "single_word": false,
25
+ "special": true
26
+ },
27
+ "102": {
28
+ "content": "[SEP]",
29
+ "lstrip": false,
30
+ "normalized": false,
31
+ "rstrip": false,
32
+ "single_word": false,
33
+ "special": true
34
+ },
35
+ "103": {
36
+ "content": "[MASK]",
37
+ "lstrip": false,
38
+ "normalized": false,
39
+ "rstrip": false,
40
+ "single_word": false,
41
+ "special": true
42
+ }
43
+ },
44
+ "additional_special_tokens": [],
45
+ "clean_up_tokenization_spaces": false,
46
+ "cls_token": "[CLS]",
47
+ "cls_token_box": [
48
+ 0,
49
+ 0,
50
+ 0,
51
+ 0
52
+ ],
53
+ "do_basic_tokenize": true,
54
+ "do_lower_case": true,
55
+ "extra_special_tokens": {},
56
+ "mask_token": "[MASK]",
57
+ "model_max_length": 512,
58
+ "never_split": null,
59
+ "only_label_first_subword": true,
60
+ "pad_token": "[PAD]",
61
+ "pad_token_box": [
62
+ 0,
63
+ 0,
64
+ 0,
65
+ 0
66
+ ],
67
+ "pad_token_label": -100,
68
+ "processor_class": "LayoutLMv2Processor",
69
+ "sep_token": "[SEP]",
70
+ "sep_token_box": [
71
+ 1000,
72
+ 1000,
73
+ 1000,
74
+ 1000
75
+ ],
76
+ "strip_accents": null,
77
+ "tokenize_chinese_chars": true,
78
+ "tokenizer_class": "LayoutLMv2Tokenizer",
79
+ "unk_token": "[UNK]"
80
+ }
training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1cd63c02b93f2ac80b5e57f7422f44b93b004f810e2f190e473e7d489d2a2aeb
3
+ size 5368
vocab.txt ADDED
The diff for this file is too large to render. See raw diff