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

Support in_channels with tuple in GENConv for bipartite message passing #5627

Merged
merged 8 commits into from Oct 8, 2022

Conversation

lightaime
Copy link
Contributor

This PR supports passing in_channels with tuple to GENConv for bipartite message passing by projecting channels to the same dimension if channels mismatch.

@github-actions github-actions bot added the nn label Oct 7, 2022
@codecov
Copy link

codecov bot commented Oct 7, 2022

Codecov Report

Merging #5627 (bcf6fcc) into master (2d77047) will decrease coverage by 0.00%.
The diff coverage is 79.16%.

@@            Coverage Diff             @@
##           master    #5627      +/-   ##
==========================================
- Coverage   83.87%   83.87%   -0.01%     
==========================================
  Files         349      349              
  Lines       19196    19207      +11     
==========================================
+ Hits        16101    16109       +8     
- Misses       3095     3098       +3     
Impacted Files Coverage Δ
torch_geometric/nn/conv/gen_conv.py 84.14% <79.16%> (-1.77%) ⬇️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

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.

Can we add some corresponding tests?

torch_geometric/nn/conv/gen_conv.py Show resolved Hide resolved
channels.append(out_channels)
self.mlp = MLP(channels, norm=norm)

self.msg_norm = MessageNorm(learn_msg_scale) if msg_norm else None
if in_channels[0] != in_channels[1]:
Copy link
Member

@rusty1s rusty1s Oct 7, 2022

Choose a reason for hiding this comment

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

and in_channels=[0] != -1?

Copy link
Contributor Author

@lightaime lightaime Oct 7, 2022

Choose a reason for hiding this comment

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

Good point! Updated.

lightaime and others added 2 commits October 7, 2022 20:05
Co-authored-by: Matthias Fey <matthias.fey@tu-dortmund.de>
@lightaime
Copy link
Contributor Author

Can we add some corresponding tests?

Sure. Will update it later.

@lightaime lightaime merged commit d5e2e1e into master Oct 8, 2022
@lightaime lightaime deleted the gen_conv_bipartite branch October 8, 2022 17:34
JakubPietrakIntel pushed a commit to JakubPietrakIntel/pytorch_geometric that referenced this pull request Nov 25, 2022
… passing (pyg-team#5627)

* changelog

* Support in_channels with tuple for bipartite message passing

* changelog

* update

Co-authored-by: Matthias Fey <matthias.fey@tu-dortmund.de>

* support lazy init

* Added test

Co-authored-by: Guohao Li <lighaime@gmail.com>
Co-authored-by: Matthias Fey <matthias.fey@tu-dortmund.de>
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