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

RT-DETR中的where #8548

Open
3 tasks done
sdreamforchen opened this issue Aug 17, 2023 · 1 comment
Open
3 tasks done

RT-DETR中的where #8548

sdreamforchen opened this issue Aug 17, 2023 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@sdreamforchen
Copy link

问题确认 Search before asking

  • 我已经查询历史issue,没有发现相似的bug。I have searched the issues and found no similar bug report.

Bug组件 Bug Component

No response

Bug描述 Describe the Bug

anchors = paddle.where(valid_mask, anchors,

以及https://github.com/PaddlePaddle/PaddleDetection/blob/a3e9c925074dd91f98516c2bac057d190af9d7aa/ppdet/modeling/transformers/rtdetr_transformer.py#L524C16-L524C16
您好,我自己单独把这个_generate_anchors写了一个python跑了一下,valid_mask恒为true:
1 onnx导出为false
2 这两个where是否有必要哇。
应该是我理解错了。 麻烦解答一下,谢谢!!!

复现环境 Environment

develop分支

Bug描述确认 Bug description confirmation

  • 我确认已经提供了Bug复现步骤、代码改动说明、以及环境信息,确认问题是可以复现的。I confirm that the bug replication steps, code change instructions, and environment information have been provided, and the problem can be reproduced.

是否愿意提交PR? Are you willing to submit a PR?

  • 我愿意提交PR!I'd like to help by submitting a PR!
@sdreamforchen sdreamforchen added the bug Something isn't working label Aug 17, 2023
@lyuwenyu
Copy link
Collaborator

lyuwenyu commented Aug 17, 2023

其实他是为了保证生成的anchors是个合格的bbox 在看前面生成的时候有些超参数控制的 不排除在某些条件下生成的box有问题 所以才有这个逻辑

valid_mask = ((anchors > self.eps) *
(anchors < 1 - self.eps)).all(-1, keepdim=True)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants