Why does batch_size in dataloader only create batches across graphs, and not across data samples? #2634
-
Is there any reason why the dataloader creates batches only across graphs but not across the data samples? I'm using the WikiCS dataset, and using a dataloader here. This dataset only contains one graph. Because it has only 1 graph, when I'm using the dataloader, it only creates on batch of the same size of the dataset. If a dataset just contains one large graph, then wouldn't it be desired to create batches from this?
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
For the dataset consists of one large graph, I think you might want to divide the graph into several partitions first, then use a proper dataloader such as Clusterloader so that each batch contains several partitions of the graph. By doing this, you train the model on a subset of the graph each step. This notebook provided by torch_geometric document would be helpful. |
Beta Was this translation helpful? Give feedback.
For the dataset consists of one large graph, I think you might want to divide the graph into several partitions first, then use a proper dataloader such as Clusterloader so that each batch contains several partitions of the graph. By doing this, you train the model on a subset of the graph each step.
This notebook provided by torch_geometric document would be helpful.