Skip to content
Discussion options

You must be logged in to vote

I think the GCNConv cannot learn the given task, as it solely seems dependent on the number of neighbors of a given node. The GCNConv will perform mean aggregation, so it does not have knowledge about the underlying number of neighbors. You can try out a different GNN op using add aggregation, e.g.:

GraphConv(in_channels, out_channels, aggr='add')

Furthermore, the warning indicates that your shapes of inputs to the loss function do not match. This should be fixable by running:

loss = criterion(out[data.train_mask].squeeze(), data.y[data.train_mask].squeeze())

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@riskiem
Comment options

@rusty1s
Comment options

@riskiem
Comment options

@yanyang-sysu
Comment options

Answer selected by riskiem
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