Skip to content

RT-DETR-L_wireless_table_cell_det_infer 模型修改推理图像尺度出现报错 #4730

@zhujun5164

Description

@zhujun5164

Checklist:

描述问题

我使用paddlex里的RT-DETR-L_wireless_table_cell_det_infer模型,在create_model的时候尝试修改img_size参数,运行推理后出现报错

复现

`
from paddlex import create_model

model = create_model(model_name="RT-DETR-L_wireless_table_cell_det", img_size=1280)
output = model.predict("d:/test.png", batch_size=1)
for res in output:
res.print(json_format=False)
res.save_to_img("./output/")
res.save_to_json("./output/res.json")
`
出现报错如下
self.predictor.run()
ValueError: In user code:

InvalidArgumentError: Broadcast dimension mismatch. Operands could not be broadcast together with the shape of X = [1, 1600, 256] and the shape of Y = [1, 400, 256]. Received [1600] in X is not equal to [400] in Y at i:1.
  [Hint: Expected x_dims_array[i] == y_dims_array[i] || (x_dims_array[i] <= 1 && x_dims_array[i] != 0) || (y_dims_array[i] <= 1 && y_dims_array[i] != 0) == true, but received x_dims_array[i] == y_dims_array[i] || (x_dims_array[i] <= 1 && x_dims_array[i] != 0) || (y_dims_array[i] <= 1 && y_dims_array[i] != 0):0 != true:1.] (at ..\paddle/phi/kernels/funcs/common_shape.h:86)

环境

  1. 请提供您使用的PaddlePaddle、PaddleX版本号、Python版本号
    python 3.11.1
    paddlepaddle 3.2.1 gpu
    paddlex 3.3.8

  2. 请提供您使用的操作系统信息,如Linux/Windows/MacOS
    window

  3. 请问您使用的CUDA/cuDNN的版本号是?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions