Sharpiless / PaddleDetection-Yolov5

基于Paddlepaddle复现yolov5,支持PaddleDetection接口
Apache License 2.0
40 stars 13 forks source link

yoloV5 L 模型训练没问题infer报错 #7

Open GanWang opened 2 years ago

GanWang commented 2 years ago

yoloV5 L 模型训练没问题infer报错:
File "/home/aistudio/work/ppdet/modeling/ops.py", line 820, in ops_yolo_box_v5 p = x.reshape((bs, nA, classnum + 5, nG,nG)).transform((0, 1, 3, 4, 2)).contiguous() File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddle/tensor/manipulation.py", line 1582, in reshape return paddle.fluid.layers.reshape(x=x, shape=shape, name=name) File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddle/fluid/layers/nn.py", line 6142, in reshape out, = core.ops.reshape2(x, None, 'shape', shape) ValueError: (InvalidArgument) The 'shape' in ReshapeOp is invalid. The input tensor X'size must be equal to the capacity of 'shape'. But received X's shape = [1, 21, 20, 20], X's size = 8400, 'shape' is [1, 6, 7, 20, 20], the capacity of 'shape' is 16800. [Hint: Expected capacity == in_size, but received capacity:16800 != in_size:8400.] (at /paddle/paddle/fluid/operators/reshape_op.cc:222) [operator < reshape2 > error]