-
Notifications
You must be signed in to change notification settings - Fork 7.8k
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ValueError: (InvalidArgument) The 'shape' attribute in ReshapeOp is invalid #11441
Comments
使用python tools/infer.py 进行预测没有问题,但是导出模型后,使用就存在上面的异常 |
上面问题原因找到了,模型文件用错误了,但是改掉后有报新的粗误了: |
问题应该是导出的模型的问题,请问下picodet_lcnet_x1_0_fgd_layout_cdla_infer 和picodet_lcnet_x1_0_layout 有什么区别 |
应该是预测框的大小不匹配导致 |
cdla是用中文数据集训练的,后面的是用英文数据集 |
兄弟我也是迁徙学习的这个模型,在infer.py正常导出到PPStructure就报错: |
你这个看信息是维度的问题,传递的应该是4维或5维 但是接收使用的是1维 |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
请提供下述完整信息以便快速定位问题/Please provide the following information to quickly locate the problem
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) #这行报错
#注:以上是编写的执行自训练的模型文件进行预测,但调用后报先面的错误
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.
The text was updated successfully, but these errors were encountered: