Skip to content
This repository has been archived by the owner on Mar 12, 2024. It is now read-only.

Question about object queries. #604

Open
AjibolaPy opened this issue Sep 11, 2023 · 4 comments
Open

Question about object queries. #604

AjibolaPy opened this issue Sep 11, 2023 · 4 comments

Comments

@AjibolaPy
Copy link

I've gone through the code. I learned that object queries are nn.Embedding weights and zeros matrixes are added if you wish to add positional Embedding.

My confusion/question is are the embeddings trainable since it is a weight of the embedding layer?

@quamernasim
Copy link

quamernasim commented Oct 15, 2023

I had the same confusion. I checked, embedding weights are not being updated

EDIT: I rechecked and embedding weights are indeed changing

@MLDeS
Copy link

MLDeS commented Nov 7, 2023

In the Colab notebook, it is initialized as nn.parameter. Also, this should be learnable, right? That's the point of the paper, that they use learnable queries. How did you verify that they are not updated?

@AjibolaPy
Copy link
Author

In the Colab notebook, it is initialized as nn.parameter. Also, this should be learnable, right? That's the point of the paper, that they use learnable queries. How did you verify that they are not updated?

Since the weight are learnt weight. Then they should will be updated every step.
You said nn.parameter, they didn't use Embedding layer?

@quamernasim
Copy link

sorry about the confusion guys. Someday later after posting this comment, I revisited the detr and saw that indeed the query weights are changing and hence learnt. In the colab they used this nn.parameter but in the actual implementation they have used nn.Embeddings

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants