Changed edge_label_index after LinkNeighborLoader #7793
-
Before starting, sorry for the frequent question. train_data
# Data(edge_index=[2, 2159112], pos_edge_label=[343], pos_edge_label_index=[2, 343], neg_edge_label=[343], neg_edge_label_index=[2, 343], edge_label=[686], edge_label_index=[2, 686], x=[47822, 259])
train_data.edge_label_index
# tensor([[ 5296, 613, 322, ..., 19970, 24669, 27129],
# [18473, 9092, 9092, ..., 9153, 12671, 19081]]) When I run the train_loader = LinkNeighborLoader(train_data, edge_label_index=train_data.edge_label_index, batch_size=3, shuffle=True, neg_sampling_ratio=1.0, num_neighbors=[3,3])
for data in train_loader:
print(data.edge_label_index)
# tensor([[ 1, 3, 5, 4, 7, 6],
# [ 2, 0, 10, 8, 11, 9]])
# tensor([[ 0, 2, 6, 10, 1, 11],
# [ 9, 3, 5, 7, 8, 4]])
# ... Although I confirmed that the model learned the features and read the PyG documentation (https://pytorch-geometric.readthedocs.io/en/latest/advanced/batching.html), I cannot understand why the range of the edge index is changed. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 17 replies
-
Hey @songsong0425! I reported this issue via PyG Slack last night, and #7791 has just fixed the issue! |
Beta Was this translation helpful? Give feedback.
Hey @songsong0425! I reported this issue via PyG Slack last night, and #7791 has just fixed the issue!