-
Hi! So Im trying to use - https://github.com/pyg-team/pytorch_geometric/blob/master/examples/pna.py on a custom dataset, but my dataset doesn't have edge_attr. Is there a way to generate dummy edge_attr to use it with the code ? Any suggestions would be welcome. Thank you in advance! |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 23 replies
-
No need to create dummy edge features. Simply drop the edge_dim argument and do not pass edge_attr to the forward call of the GNN layer. |
Beta Was this translation helpful? Give feedback.
-
Hi! Thank you for the response. It works. But I was having a runtime error. Im not sure how to resolve this. Could you please point me in the direction as to where could be the problem. Thanks |
Beta Was this translation helpful? Give feedback.
-
`data DataBatch(x=[646, 11], edge_index=[2, 1202], edge_attr=[1202, 4], y=[64, 19], pos=[646, 3], idx=[64], name=[64], z=[646], batch=[646], ptr=[65])
|
Beta Was this translation helpful? Give feedback.
-
Note that your loss should be averaged across all examples (otherwise the loss value gets increased if the size of your dataset gets bigger). Currently, it looks like you are only averaging within mini-batches. Your model architecture looks good to me, but I would probably start benchmarking with towers=1 and a reasonable hidden_channels value, e.g., 64 or 128. |
Beta Was this translation helpful? Give feedback.
No need to create dummy edge features. Simply drop the edge_dim argument and do not pass edge_attr to the forward call of the GNN layer.