How is feature matrix mapped to nodes? #4304
-
Sorry for the silly question, but when initializing
In the above example, how do I ensure that. [-1] is mapped to node 0 |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
The node indices correspond to the row index of the feature matrix. That is, |
Beta Was this translation helpful? Give feedback.
-
Thanks a lot. Just curious, what happens if node indices are not mapped to |
Beta Was this translation helpful? Give feedback.
The node indices correspond to the row index of the feature matrix. That is,
x[0]
denotes the features of node0
,x[1]
denotes the features of node1
, and so on. As such, node indices in PyG need to be mapped to the0
tonum_nodes - 1
range. Let me know if this resolves your issue :)