Skip to content
Discussion options

You must be logged in to vote

For datasets like Mutag you could directly use RGCNConv, it has a different parameters for each edge_type.

But if you want to convert something like Mutag to HeteroData, one way to do it would be

from torch_geometric.data import HeteroData
data = HeteroData()
data['node_type1'].x = mutag.x # assuming there's just one node type.
for i in mutag.edge_type.unique():
    data['node_type1', str(int(i)), 'node_type1'] = mutag.edge_index[:,mutage.edge_type ==i]

Replies: 2 comments 10 replies

Comment options

You must be logged in to vote
9 replies
@rusty1s
Comment options

@isratnisa
Comment options

@rusty1s
Comment options

@rusty1s
Comment options

@isratnisa
Comment options

Answer selected by isratnisa
Comment options

You must be logged in to vote
1 reply
@rusty1s
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants