PaddleOCR icon indicating copy to clipboard operation
PaddleOCR copied to clipboard

ch_PP-OCRv3_rec训练SARHead报错

Open xu-peng-7 opened this issue 2 years ago • 0 comments

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

[- 系统环境/System Environment:

  • 版本号/Version:Paddle: PaddleOCR: 问题相关组件/Related components:
  • 运行指令/Command Code:
  • 完整报错/Complete Error Message:](https://github.com/PaddlePaddle/PaddleOCR/blob/release/2.5/configs/rec/PP-OCRv3/ch_PP-OCRv3_rec.yml)

训练中出现:维度报错 File "/home/xupeng/.conda/envs/paddleOCR/lib/python3.8/site-packages/paddle/fluid/dygraph/layers.py", line 915, in _dygraph_call_func outputs = self.forward(*inputs, **kwargs) File "/data/xupeng/text-detection-recognition/src-py/PaddleOCR/src/ppocr/modeling/heads/rec_sar_head.py", line 132, in forward return self.forward_train(feat, out_enc, label, img_metas) File "/data/xupeng/text-detection-recognition/src-py/PaddleOCR/src/ppocr/modeling/heads/rec_sar_head.py", line 302, in forward_train in_dec = paddle.concat((out_enc, lab_embedding), axis=1) File "/home/xupeng/.conda/envs/paddleOCR/lib/python3.8/site-packages/paddle/tensor/manipulation.py", line 331, in concat return paddle.fluid.layers.concat(input=x, axis=axis, name=name) File "/home/xupeng/.conda/envs/paddleOCR/lib/python3.8/site-packages/paddle/fluid/layers/tensor.py", line 343, in concat _C_ops.concat(input, out, 'axis', axis) ValueError: (InvalidArgument) The shape of input[0] and input[1] is expected to be equal.But received input[0]'s shape = [256, 1, 512], input[1]'s shape = [256, 512]. [Hint: Expected inputs_dims[i].size() == out_dims.size(), but received inputs_dims[i].size():2 != out_dims.size():3.] (at /paddle/paddle/phi/kernels/funcs/concat_funcs.h:55) [operator < concat > error]

xu-peng-7 avatar Aug 11 '22 03:08 xu-peng-7