Skip to content
Discussion options

You must be logged in to vote

The problem is in line

 train_data = graph.__class__(x=graph.x[train_mask], edge_index=graph.edge_index)

where you reduce the number of nodes but keep the original edge_index.

If you want to remove nodes, it's better to use data.subgraph(train_mask) instead.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@KevinHooah
Comment options

@rusty1s
Comment options

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