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

Obtain Query POS Embeddings in Semantically Aligner #12

Open
jiaozhiqiang opened this issue Dec 4, 2022 · 1 comment
Open

Obtain Query POS Embeddings in Semantically Aligner #12

jiaozhiqiang opened this issue Dec 4, 2022 · 1 comment

Comments

@jiaozhiqiang
Copy link

Thank you very much for your contribution!
I want to know why the Query POS Embedding in Semantically Aligner has the operation of "*0.5" before it passes through Sin POS Embedding.

q_pos_scale = reference_boxes[:, :, 2:].reshape(bs, num_queries, 1, 2).expand(-1, -1, self.nheads, -1) * 0.5

I look forward to your valuable reply,Thank you.

@ZhangGongjie
Copy link
Owner

reference_boxes[:, :, 2:] represents the width and height of the reference boxes. We wish to control the sampling space within the reference space, so we multiply it by 0.5 as the scale of spatial sampling.

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

2 participants