PaddleOCR icon indicating copy to clipboard operation
PaddleOCR copied to clipboard

文本识别模型SRN转为推理模型执行predict_rec.py报错,CRNN正常

Open InferMaster opened this issue 2 years ago • 0 comments

请提供下述完整信息以便快速定位问题/Please provide the following information to quickly locate the problem

  • 系统环境/System Environment:ubuntu 18.04
  • 版本号/Version:Paddle: PaddleOCR: 问题相关组件/Related components:
  • 运行指令/Command Code:
  • python tools/infer/predict_rec.py --image_dir="/root/autodl-tmp/paddleocr-2.2_MaxLen/dataset/rec/infer/58.jpg" --rec_model_dir="/root/autodl-tmp/paddleocr-2.2_MaxLen/inference/rec/srn" --rec_algorithm="SRN"
  • 完整报错/Complete Error Message: InvalidArgumentError: 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, 512, 4, 40], X's size = 81920, 'shape' is [-1, 512, 256], known capacity of 'shape' is -131072. [Hint: Expected output_shape[unk_dim_idx] * capacity == -in_size, but received output_shape[unk_dim_idx] * capacity:0 != -in_size:-81920.] (at ..\paddle/fluid/operators/reshape_op.cc:190) [operator < reshape2 > error]

image image

InferMaster avatar Nov 01 '22 07:11 InferMaster