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

Add EGNNConv support for HeteroGraphConv #386

Draft
wants to merge 13 commits into
base: master
Choose a base branch
from

Conversation

rbSparky
Copy link
Contributor

Covers Issue #311

This is a work in progress, just wanted to make sure I am on the right track

Since EGNNConv has H as input as well I added another function:

function (hgc::HeteroGraphConv)(g::GNNHeteroGraph, x::NamedTuple, h::AbstractMatrix)
    function forw(l, et)
        sg = edge_type_subgraph(g, et)
        node1_t, _, node2_t = et

        x_features = (x[node1_t], x[node2_t])
        h_features = h # temporary

        return l(sg, h_features, x_features)
    end
    outs = [forw(l, et) for (l, et) in zip(hgc.layers, hgc.etypes)]
    dst_ntypes = [et[3] for et in hgc.etypes]
    return _reduceby_node_t(hgc.aggr, outs, dst_ntypes)
end

Let me know if there is an alternative like using the arg in the old function (pass as a Dict) but this just seemed more convenient.

Will add more updates and test in the coming days. Will remove all debug statements when done.

@CarloLucibello
Copy link
Owner

is there an idea or some effort planned in fixing this? Otherwise better close so that it won't prevent other people from working on it

@rbSparky
Copy link
Contributor Author

rbSparky commented Mar 4, 2024

is there an idea or some effort planned in fixing this? Otherwise better close so that it won't prevent other people from working on it

Yes, currently I'm trying to make it work.
I'll close it if there is no progress

@rbSparky
Copy link
Contributor Author

rbSparky commented Mar 4, 2024

Could you confirm if I'm on the right path?
Thanks

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

Successfully merging this pull request may close these issues.

3 participants