Skip to content
Discussion options

You must be logged in to vote

@jasperhyp In your examples it looks like the issue is due to the fact that the HeteroData does not know the number of nodes 'y' has, so when you try to compute metapaths, the number of nodes is inferred to be the number of nodes included in the edge index. Since 'a' and 'b_inv' both mention different numbers of nodes in 'y', this leads to an error because the number of nodes inferred for y is different, so two incompatible adjacency matrices are constructed.

The easiest way to fix this is to specify the number of nodes in 'y', either by setting the .num_nodes attribute, or setting the .x attribute to a feature matrix of the correct shape. For example:

# Not OK
temp = {('x', 'a', 'y'):{'e…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

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

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