AssertionError when implementing heterogenous GNN #5175
Unanswered
PolarisRisingWar
asked this question in
Q&A
Replies: 2 comments 1 reply
-
Sadly, the error messages produced by PyTorch ate not very descriptive here. My guess is that your data is incorrectly formatted. Try to run: for edge_type in data.edge_types:
src, _, dst = edge_type
assert data[edge_type].edge_index[0].max() < data[src].num_nodes
assert data[edge_type].edge_index[1].max() < data[dst].num_nodes |
Beta Was this translation helpful? Give feedback.
0 replies
-
OK. After upgrading to nightly version, the bug messages become more clear. And I found that's because my edge index are in torch.int64 rather than torch.long, and my x are in torch.long and torch.float. I changed edge index to torch.long, and x to torch.float, which makes me able to run this code. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
This is my output message:
I don't know why this happened? This is my data printed:
But when using this code, I can run properly (I think I just have changed data object):
Beta Was this translation helpful? Give feedback.
All reactions