首页 Paddle Inference 帖子详情
RT-DETR转ONNX后进行推理报错,麻烦大佬给新手指教,谢谢
收藏
快速回复
Paddle Inference 问答推理部署 350 2
RT-DETR转ONNX后进行推理报错,麻烦大佬给新手指教,谢谢
收藏
快速回复
Paddle Inference 问答推理部署 350 2
onnxruntime.capi.onnxruntime_pybind11_state.InvalidArgument: [ONNXRuntimeError] : 2 : INVALID_ARGUMENT : Non-zero status code returned while running Tile node. Name:'p2o.Tile.3' Status Message: the tensor to be tiled using Tile OP must be atleast 1 dimensional
org_img = img
im_shape = np.array([[float(img.shape[0]), float(img.shape[1])]]).astype('float32')
img = cv2.resize(img, (640, 640))
scale_factor = np.array([[float(640 / img.shape[0]), float(640 / img.shape[1])]]).astype('float32')
img = img.astype(np.float32) / 255.0
input_img = np.transpose(img, [2, 0, 1])
image = input_img[np.newaxis, :, :, :]
output_dict = ["reshape2_95.tmp_0", "tile_3.tmp_0"]
inputs_dict = {
    'im_shape': im_shape,
    'image': image,
    'scale_factor': scale_factor
}
print(image)

result = sess.run(
    # output_names=['labels', 'boxes', 'scores'],
    output_names=output_dict,
    input_feed=inputs_dict
)
0
收藏
回复
全部评论(2)
时间顺序
d
derek327
#2 回复于2024-03

解决没,我也遇到了

0
回复
d
derek327
#3 回复于2024-03

解决没,遇到同样问题

0
回复
需求/bug反馈?一键提issue告诉我们
发现bug?如果您知道修复办法,欢迎提pr直接参与建设飞桨~
在@后输入用户全名并按空格结束,可艾特全站任一用户