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

Some misunderstanding about the heat map using to predict Relationship #46

Closed
kent252 opened this issue Feb 19, 2024 · 2 comments
Closed

Comments

@kent252
Copy link

kent252 commented Feb 19, 2024

Hello, thank you very much for providing the code. However, in the paper, you said that "The predicate probability pˆ𝑝𝑟𝑑 is predicted by a multi-layer perceptron concatenating the corresponding subject representation, object representation, and spatial feature vector, which can be formulated as:
pˆ𝑝𝑟𝑑 = softmax(MLP([Q𝑠,Q𝑜,V𝑠𝑝𝑎]))."
But in the source code, I don't see this concatenating, I just see that you used sub heatmap for prediction. Could you explain it to me. Thank you very much

  • In RelTR model:
    image
  • and in Transformer:
    image
@yrcong
Copy link
Owner

yrcong commented Feb 29, 2024

Hello, please check Line 111 in relater.py

outputs_class_rel = self.rel_class_embed(torch.cat((hs_sub, hs_obj, so_masks), dim=-1))

@kent252
Copy link
Author

kent252 commented Mar 2, 2024

Thanks for your immediate response. I appreciate that very much

@kent252 kent252 closed this as completed Mar 2, 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

2 participants