PaddlePaddle / PaddleOCR

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)
https://paddlepaddle.github.io/PaddleOCR/
Apache License 2.0
44.34k stars 7.83k forks source link

paddlepaddle/paddle:3.0.0b2表格识别报错:InvalidArgumentError: The shape of input[0] and input[1] is expected to be equal #14163

Open kenekai opened 1 week ago

kenekai commented 1 week ago

🔎 Search before asking

🐛 Bug (问题描述)

docker 在paddlepaddle/paddle:3.0.0b2环境尝试表格识别报错,提示:In user code:\n\n\n InvalidArgumentError: The shape of input[0] and input[1] is expected to be equal.But received input[0]'s shape = [], input[1]'s shape = [1].\n [Hint: Expected inputs_dims[i].size() == out_dims.size(), but received inputs_dims[i].size():1 != out_dims.size():0.] (at /paddle/paddle/phi/kernels/funcs/concat_funcs.h:55)\n [operator < pd_kernel.phi_kernel > error] image

同样配置在paddlepaddle/paddle:2.6.2环境可以正常表格识别 image

🏃‍♂️ Environment (运行环境)

paddle = paddlepaddle/paddle:3.0.0b2 model = ch_ppstructure_mobile_v2.0_SLANet_infer/ch_ppstructure_openatom_SLANetv2_infer、ch_PP-OCRv4_det_infer、ch_PP-OCRv4_rec_infer

🌰 Minimal Reproducible Example (最小可复现问题的Demo)

python table/predict_structure.py --table_model_dir=../inference/ch_ppstructure_openatom_SLANetv2_infer/ --table_char_dict_path=../ppocr/utils/dict/table_structure_dict.txt --image_dir=docs/table/table.jpg --output=../output/table_slanet_lcnetv2 --use_gpu=False --enable_mkldnn=True --table_max_len=512

UserWangZz commented 1 week ago

试试使用paddlex可以正常推理吗?paddle3.0.0b2可能需要重新进行一下模型导出

kenekai commented 1 week ago

试试使用paddlex可以正常推理吗?paddle3.0.0b2可能需要重新进行一下模型导出 请问paddle3.0.0b2重新进行一下模型导出有教程吗?

UserWangZz commented 1 week ago

文档里就有,用paddle3.0.0b2将动态图重新导出一下试试

cuicheng01 commented 5 days ago

请问该如何复现呢?目前无法复现