Awesome multilingual OCR toolkits based on PaddlePaddle (practical ultra lightweight OCR system, support 80+ languages recognition, provide data annotation and synthesis tools, support training and deployment among server, mobile, embedded and IoT devices)
Traceback (most recent call last):
File "tools/train.py", line 229, in <module>
main(config, device, logger, vdl_writer, seed)
File "tools/train.py", line 200, in main
program.train(config, train_dataloader, valid_dataloader, device, model,
File "/home/lvhs/ocr/PaddleOCR/tools/program.py", line 306, in train
preds = model(batch)
File "/home/lvhs/anaconda3/envs/paddle_env/lib/python3.8/site-packages/paddle/nn/layer/layers.py", line 1254, in __call__
return self.forward(*inputs, **kwargs)
File "/home/lvhs/ocr/PaddleOCR/ppocr/modeling/architectures/base_model.py", line 86, in forward
x = self.backbone(x)
File "/home/lvhs/anaconda3/envs/paddle_env/lib/python3.8/site-packages/paddle/nn/layer/layers.py", line 1254, in __call__
return self.forward(*inputs, **kwargs)
File "/home/lvhs/ocr/PaddleOCR/ppocr/modeling/backbones/vqa_layoutlm.py", line 220, in forward
x = self.model(
File "/home/lvhs/anaconda3/envs/paddle_env/lib/python3.8/site-packages/paddle/nn/layer/layers.py", line 1254, in __call__
return self.forward(*inputs, **kwargs)
File "/home/lvhs/anaconda3/envs/paddle_env/lib/python3.8/site-packages/paddlenlp/transformers/layoutxlm/modeling.py", line 1329, in forward
loss, pred_relations = self.extractor(sequence_output, entities, relations)
File "/home/lvhs/anaconda3/envs/paddle_env/lib/python3.8/site-packages/paddle/nn/layer/layers.py", line 1254, in __call__
return self.forward(*inputs, **kwargs)
File "/home/lvhs/anaconda3/envs/paddle_env/lib/python3.8/site-packages/paddlenlp/transformers/layoutxlm/modeling.py", line 1222, in forward
batch_size, max_length, _ = paddle.shape(entities)
ValueError: too many values to unpack (expected 3)
Traceback (most recent call last):
File "tools/train.py", line 229, in <module>
main(config, device, logger, vdl_writer, seed)
File "tools/train.py", line 200, in main
program.train(config, train_dataloader, valid_dataloader, device, model,
File "/home/lvhs/ocr/PaddleOCR/tools/program.py", line 395, in train
cur_metric = eval(
File "/home/lvhs/ocr/PaddleOCR/tools/program.py", line 566, in eval
post_result = post_process_class(preds, batch_numpy)
File "/home/lvhs/ocr/PaddleOCR/ppocr/postprocess/vqa_token_re_layoutlm_postprocess.py", line 27, in __call__
pred_relations = self.decode_pred(pred_relations)
File "/home/lvhs/ocr/PaddleOCR/ppocr/postprocess/vqa_token_re_layoutlm_postprocess.py", line 61, in decode_pred
pred_relation = pred_relation[1:pred_relation[0, 0, 0] + 1]
TypeError: list indices must be integers or slices, not tuple
Traceback (most recent call last):
File "tools/train.py", line 229, in <module>
main(config, device, logger, vdl_writer, seed)
File "tools/train.py", line 200, in main
program.train(config, train_dataloader, valid_dataloader, device, model,
File "/home/lvhs/ocr/PaddleOCR/tools/program.py", line 306, in train
preds = model(batch)
File "/home/lvhs/anaconda3/envs/paddle_env/lib/python3.8/site-packages/paddle/nn/layer/layers.py", line 1254, in __call__
return self.forward(*inputs, **kwargs)
File "/home/lvhs/ocr/PaddleOCR/ppocr/modeling/architectures/base_model.py", line 86, in forward
x = self.backbone(x)
File "/home/lvhs/anaconda3/envs/paddle_env/lib/python3.8/site-packages/paddle/nn/layer/layers.py", line 1254, in __call__
return self.forward(*inputs, **kwargs)
File "/home/lvhs/ocr/PaddleOCR/ppocr/modeling/backbones/vqa_layoutlm.py", line 220, in forward
x = self.model(
File "/home/lvhs/anaconda3/envs/paddle_env/lib/python3.8/site-packages/paddle/nn/layer/layers.py", line 1254, in __call__
return self.forward(*inputs, **kwargs)
File "/home/lvhs/anaconda3/envs/paddle_env/lib/python3.8/site-packages/paddlenlp/transformers/layoutxlm/modeling.py", line 1329, in forward
loss, pred_relations = self.extractor(sequence_output, entities, relations)
File "/home/lvhs/anaconda3/envs/paddle_env/lib/python3.8/site-packages/paddle/nn/layer/layers.py", line 1254, in __call__
return self.forward(*inputs, **kwargs)
File "/home/lvhs/anaconda3/envs/paddle_env/lib/python3.8/site-packages/paddlenlp/transformers/layoutxlm/modeling.py", line 1223, in forward
relations, entities = self.build_relation(relations, entities)
File "/home/lvhs/anaconda3/envs/paddle_env/lib/python3.8/site-packages/paddlenlp/transformers/layoutxlm/modeling.py", line 1185, in build_relation
negative_relations = all_possible_relations[negative_mask]
File "/home/lvhs/anaconda3/envs/paddle_env/lib/python3.8/site-packages/paddle/fluid/dygraph/tensor_patch_methods.py", line 747, in __getitem__
return self._getitem_index_not_tensor(item)
ValueError: (InvalidArgument) Currently, Tensor.__indices__() only allows indexing by Integers, Slices, Ellipsis, None, tuples of these types and list of Bool and Integers, but received bool in 1th slice item (at ../paddle/fluid/pybind/slice_utils.h:298)
Traceback (most recent call last):
File "tools/train.py", line 229, in <module>
main(config, device, logger, vdl_writer, seed)
File "tools/train.py", line 200, in main
program.train(config, train_dataloader, valid_dataloader, device, model,
File "/home/lvhs/ocr/PaddleOCR/tools/program.py", line 306, in train
preds = model(batch)
File "/home/lvhs/anaconda3/envs/paddle_env/lib/python3.8/site-packages/paddle/nn/layer/layers.py", line 1254, in __call__
return self.forward(*inputs, **kwargs)
File "/home/lvhs/ocr/PaddleOCR/ppocr/modeling/architectures/distillation_model.py", line 59, in forward
result_dict[model_name] = self.model_list[idx](x, data)
File "/home/lvhs/anaconda3/envs/paddle_env/lib/python3.8/site-packages/paddle/nn/layer/layers.py", line 1254, in __call__
return self.forward(*inputs, **kwargs)
File "/home/lvhs/ocr/PaddleOCR/ppocr/modeling/architectures/base_model.py", line 86, in forward
x = self.backbone(x)
File "/home/lvhs/anaconda3/envs/paddle_env/lib/python3.8/site-packages/paddle/nn/layer/layers.py", line 1254, in __call__
return self.forward(*inputs, **kwargs)
File "/home/lvhs/ocr/PaddleOCR/ppocr/modeling/backbones/vqa_layoutlm.py", line 220, in forward
x = self.model(
File "/home/lvhs/anaconda3/envs/paddle_env/lib/python3.8/site-packages/paddle/nn/layer/layers.py", line 1254, in __call__
return self.forward(*inputs, **kwargs)
File "/home/lvhs/anaconda3/envs/paddle_env/lib/python3.8/site-packages/paddlenlp/transformers/layoutxlm/modeling.py", line 1329, in forward
loss, pred_relations = self.extractor(sequence_output, entities, relations)
File "/home/lvhs/anaconda3/envs/paddle_env/lib/python3.8/site-packages/paddle/nn/layer/layers.py", line 1254, in __call__
return self.forward(*inputs, **kwargs)
File "/home/lvhs/anaconda3/envs/paddle_env/lib/python3.8/site-packages/paddlenlp/transformers/layoutxlm/modeling.py", line 1223, in forward
relations, entities = self.build_relation(relations, entities)
File "/home/lvhs/anaconda3/envs/paddle_env/lib/python3.8/site-packages/paddlenlp/transformers/layoutxlm/modeling.py", line 1185, in build_relation
negative_relations = all_possible_relations[negative_mask]
File "/home/lvhs/anaconda3/envs/paddle_env/lib/python3.8/site-packages/paddle/fluid/dygraph/tensor_patch_methods.py", line 747, in __getitem__
return self._getitem_index_not_tensor(item)
ValueError: (InvalidArgument) Currently, Tensor.__indices__() only allows indexing by Integers, Slices, Ellipsis, None, tuples of these types and list of Bool and Integers, but received bool in 1th slice item (at ../paddle/fluid/pybind/slice_utils.h:298)
我们提供了AceIssueSolver来帮助你解答问题,你是否想要它来解答(请填写yes/no)?/We provide AceIssueSolver to solve issues, do you want it? (Please write yes/no): yes
请尽量不要包含图片在问题中/Please try to not include the image in the issue.
请提供下述完整信息以便快速定位问题/Please provide the following information to quickly locate the problem
运行指令/Command Code:python3 tools/train.py -c configs/kie/layoutlm_series/re_layoutxlm_xfund_zh.yml
运行指令/Command Code:python3 tools/train.py -c configs/kie/layoutlm_series/re_layoutlmv2_xfund_zh.yml
运行指令/Command Code:python3 tools/train.py -c configs/kie/vi_layoutxlm/re_vi_layoutxlm_xfund_zh.yml
运行指令/Command Code:python3 tools/train.py -c configs/kie/vi_layoutxlm/re_vi_layoutxlm_xfund_zh_udml.yml
我们提供了AceIssueSolver来帮助你解答问题,你是否想要它来解答(请填写yes/no)?/We provide AceIssueSolver to solve issues, do you want it? (Please write yes/no): yes
请尽量不要包含图片在问题中/Please try to not include the image in the issue.