You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ValueError: (InvalidArgument) Broadcast dimension mismatch. Operands could not be broadcast together with the shape of X = [960, 6, 512] and the shape of Y = [256, 1, 512]. Received [960] in X is not equal to [256] in Y at i:0.
[Hint: Expected x_dims_array[i] == y_dims_array[i] || x_dims_array[i] <= 1 || y_dims_array[i] <= 1 == true, but received x_dims_array[i] == y_dims_array[i] || x_dims_array[i] <= 1 || y_dims_array[i] <= 1:0 != true:1.] (at /paddle/paddle/phi/kernels/funcs/common_shape.h:86)
[operator < elementwise_add > error]
I have been using the tools/export_model.py to create the inference models, for an example like this: python3 tools/export_model.py -c configs/det/det_r50_db++_icdar15.yml -o Global.pretrained_model=/home/raymondxu/Downloads/det_r50_db++_icdar15_train/best_accuracy Global.save_inference_dir=/home/raymondxu/Downloads/exp_det_dbpp, and similarly for the rec, I pick another model and export.
However, no matter which 2 models i pick for det and rec, I get some sort of shape error.
currently, all examples are for pp-ocr, or for det and rec models being run individually. But, I am running this on a server, so I would like larger models for each to be run.
Question: How can I correctly integrate larger detection and recognition models in PaddleOCR for server use without encountering shape mismatch errors? Are there specific models or configurations that are known to work together seamlessly?
This discussion was converted from issue #11710 on June 10, 2024 07:33.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Please provide the following information to quickly locate the problem
ocr=PaddleOCR(det_model_dir=X, rec_model_dir=X, cls_model_dir=../files/paddle_models/cls/ch_ppocr_mobile_v2.0_cls_infer/) ... ocr.ocr(im, cls=True)
I have been using the tools/export_model.py to create the inference models, for an example like this:
python3 tools/export_model.py -c configs/det/det_r50_db++_icdar15.yml -o Global.pretrained_model=/home/raymondxu/Downloads/det_r50_db++_icdar15_train/best_accuracy Global.save_inference_dir=/home/raymondxu/Downloads/exp_det_dbpp
, and similarly for the rec, I pick another model and export.However, no matter which 2 models i pick for det and rec, I get some sort of shape error.
currently, all examples are for pp-ocr, or for det and rec models being run individually. But, I am running this on a server, so I would like larger models for each to be run.
Question: How can I correctly integrate larger detection and recognition models in PaddleOCR for server use without encountering shape mismatch errors? Are there specific models or configurations that are known to work together seamlessly?
Beta Was this translation helpful? Give feedback.
All reactions