Skip to content
Discussion options

You must be logged in to vote

I think you should avoid integrating PairData with HeteroData objects, this is likely to become a nightmare to maintain. Instead, you should have a PairDataset that returns a tuple of HeteroData objects:

class MyDataset(...):
    ...

    def __getitem__(self, idx):
        return self.dataset1[idx], self.dataset2[idx]

You can then use this dataset as part of torch_geometric.loader.DataLoader:

loader = DataLoader(my_dataset, ...)

for batch1, batch2 in loader:
    pass

WDYT?

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@tehranixyz
Comment options

Answer selected by tehranixyz
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants