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

Potential code bug but always good model #110

Open
huydung179 opened this issue Dec 21, 2023 · 0 comments
Open

Potential code bug but always good model #110

huydung179 opened this issue Dec 21, 2023 · 0 comments

Comments

@huydung179
Copy link

Hi,

I found a code bug. Can you verify it?

In the oneformer_transformer_decoder.py file, line 432:

feats = self.pe_layer(mask_features, None)

out_t, _ = self.class_transformer(feats, None, 
                            self.query_embed.weight[:-1], 
                            self.class_input_proj(mask_features),
                            tasks if self.use_task_norm else None)

I think you used the positional embedding as the source features. The forward method of that self.class_transformer is:

def forward(self, src, mask, query_embed, pos_embed, task_token=None):
...

I think it should be:

feats = self.class_input_proj(mask_features)

out_t, _ = self.class_transformer(feats, None, 
                            self.query_embed.weight[:-1], 
                            self.pe_layer(mask_features, None),
                            tasks if self.use_task_norm else None)
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