Creating my own dataset in pytorch-geometric

Hi,

I am using the pytorch-geomeric package to implement GCN in pytorch.
The simplest example on the pytorch-geomeric official homepage is a bit confusing to me, so I’m asking a question.
(Introduction by Example — pytorch_geometric documentation)

import torch
from torch_geometric.data import Data

edge_index = torch.tensor([[0, 1, 1, 2],
[1, 0, 2, 1]], dtype=torch.long)
x = torch.tensor([[-1], [0], [1]], dtype=torch.float)

data = Data(x=x, edge_index=edge_index)
print(data)

→ Data(edge_index=[2, 4], x=[3, 1])

In the code above, the [[-1], [0], [1]] list is considered to be embedded feature vectors of each node, but it seems that it is not specified which node’s feature vector each is. Since that is a list, the only information we can know is the value and index information. So, does the index become the node name?

That is, since ‘0’, ‘1’, ‘2’ appearing in edge_index are node names, is the feature vector of node ‘0’=[-1], the feature vector of node ‘1’=[0], and the feature vector of node ‘2’=[1]?