Using NeighborLoader #8606
-
Hi all, for data in train_loader:
print(data)
# print out: DataBatch(x=[283214, 3], edge_index=[2, 1655208], edge_attr=[1655208, 4], y=[283214], pos=[283214, 3], batch=[283214], ptr=[2])
sub_loader = NeighborLoader(
data,
num_neighbors=[-1] * 280000,
input_nodes=torch.arange(280000),
shuffle=False
)
sub_batch_counter = 0
for sub_batch in sub_loader:
T.ToUndirected()(sub_batch)
print(sub_batch)
# print out: DataBatch(x=[17242, 3], edge_index=[2, 100196], edge_attr=[100196, 4], y=[17242], pos=[17242, 3], ptr=[2], n_id=[17242], e_id=[100196], num_sampled_nodes=[280001], num_sampled_edges=[280000], input_id=[1], batch_size=1)
How may I increase my subgraph size? e.g., node number to 283214? (My torch_geometric version is 2.3.1 ) |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
This might be because not all nodes in the graph are connected together, and the largest connected component in the graph consists of a maximum of 17,242 nodes. So you are not able to increase the subgraph size. |
Beta Was this translation helpful? Give feedback.
This might be because not all nodes in the graph are connected together, and the largest connected component in the graph consists of a maximum of 17,242 nodes. So you are not able to increase the subgraph size.