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

Rectify the default attention mode "node" of the nn.HypergraphConv layer #8818

Merged
merged 1 commit into from
Jan 25, 2024
Merged

Rectify the default attention mode "node" of the nn.HypergraphConv layer #8818

merged 1 commit into from
Jan 25, 2024

Conversation

A-LOST-WAPITI
Copy link
Contributor

Greetings, esteemed individuals.

While acquainting myself with the utilization of the nn.HypergraphConv layer through the application of mock inputs, I have encountered an issue with the default attention mode, namely "node," which disrupts the functionality of the forward function.

Upon examining the source code, I have identified a potential problem with the num_nodes parameter within the softmax function at line 177. From my perspective, when attempting to compute attention scores for nodes within a hyperedge, the number of hyperedges should be considered as num_nodes.

Therefore, I have modified the value of num_nodes to correspond to the pre-calculated quantity of num_edges. As a result, the issue has been resolved, and the functionality has been restored harmoniously.

Warmest regards.

Copy link
Member

@rusty1s rusty1s left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, you are absolutely right. Thanks for catching :)

@rusty1s rusty1s changed the title Rectify the default attention mode "node" of the nn.HypergraphConv layer. Rectify the default attention mode "node" of the nn.HypergraphConv layer Jan 25, 2024
@rusty1s rusty1s merged commit 7875987 into pyg-team:master Jan 25, 2024
14 of 15 checks passed
@A-LOST-WAPITI
Copy link
Contributor Author

You're most welcome.

I appreciate your prompt response in addressing this issue, and it is also my aspiration to enhance the excellence of pyg.

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

Successfully merging this pull request may close these issues.

None yet

2 participants