2 - Priority P2featurehelp wantedloader
Repository-Metriken
- Stars
- (19.985 Stars)
- PR-Merge-Metriken
- (Durchschn. Merge 35T 1h) (14 gemergte PRs in 30 T)
Beschreibung
DataLoader are handy in some situations however they do not cover all potential use cases. For now, I only found the following way of handling batches without them. Would it be possible to have a nice helper in native torch for this?
def forward(self, x, edge_index):
batch_size, n_size = x.shape[:2]
batch = [torch_geometric.data.Data(x=t, edge_index=edge_index) for t in x]
batch = torch_geometric.data.Batch.from_data_list(batch)
x = self.net(batch.x, batch.edge_index).view(batch_size, n_size, 1)
return x