Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

使用Kserve部署yolov3时,推理结果只有一个尺度的输出(正常为三个尺度) #1883

Closed
zyf950120 opened this issue Nov 15, 2022 · 1 comment

Comments

@zyf950120
Copy link

zyf950120 commented Nov 15, 2022

我根据官网的那个林业虫类识别的案例,将模型动态转为静态后进行部署,在输入都正确的情况下,请求返回的predictions只有[1,36,20,20]一个尺度的输出,正常应该是三个尺度[[1,36,20,20], [1,36,40,40], [1,36,80,80]]。在本地使用paddle.jit.load()加载模型,然后能够正确输出三个尺度,但是部署之后就会出错,只有一个。

后来看了paddleserver中model.py源码,发现默认输出第一个位置self.output_tensor = self.predictor.get_output_handle(output_names[0])

然后我就想着给输出再包一层,但又发现文档里说:“暂不支持依赖 Tensor 的控制流中,使用多层嵌套的 list.append 操作,因为框架底层的 LoDTensorArray = std::vector< LoDTensor > ,不支持两层以上 vector 嵌套”。

虽然能够去改一下model.py源码,但是总不能每启起来一个服务就去手动改一下,而且我也没有root权限还改不了。。

有没有大神能教教什么操作能再给输出包一层。。

@github-actions
Copy link

Message that will be displayed on users' first issue

@paddle-bot paddle-bot bot closed this as completed Mar 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant