PaddleOCR
PaddleOCR copied to clipboard
ValueError: (InvalidArgument) The 'shape' attribute in ReshapeOp is invalid
请提供下述完整信息以便快速定位问题/Please provide the following information to quickly locate the problem
- 系统环境/System Environment:20.04.1-Ubuntu
- 版本号/Version:Paddle: PaddleOCR: 问题相关组件/Related components:ppstructure
- 运行指令/Command Code: design_pic_engine = PPStructure(table=False, ocr=False, show_log=True, use_gpu=False, layout_model_dir='./output_inference/picodet_s_320_coco_lcnet') result = design_pic_engine(img) #这行报错 #注:以上是编写的执行自训练的模型文件进行预测,但调用后报先面的错误
- 完整报错/Complete Error Message:
Traceback (most recent call last):
File "/data/newhome/camera/hzb_test/paddle_test/test_iso_ocr.py", line 11, in
result = design_pic_engine(img) File "/home/camera/anaconda3/envs/paddle_env/lib/python3.10/site-packages/paddleocr/paddleocr.py", line 759, in call res, _ = super().call( File "/home/camera/anaconda3/envs/paddle_env/lib/python3.10/site-packages/paddleocr/ppstructure/predict_system.py", line 112, in call layout_res, elapse = self.layout_predictor(img) File "/home/camera/anaconda3/envs/paddle_env/lib/python3.10/site-packages/paddleocr/ppstructure/layout/predict_layout.py", line 86, in call self.predictor.run() ValueError: (InvalidArgument) The 'shape' attribute in ReshapeOp is invalid. The input tensor X'size must be divisible by known capacity of 'shape'. But received X's shape = [1, 80, 100, 76], X's size = 608000, 'shape' is [-1, 80, 1600], known capacity of 'shape' is -128000. [Hint: Expected output_shape[unk_dim_idx] * capacity == -in_size, but received output_shape[unk_dim_idx] * capacity:-512000 != -in_size:-608000.] (at ../paddle/fluid/operators/reshape_op.cc:216) [operator < reshape2 > error]
我们提供了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.