Skip to content
Discussion options

You must be logged in to vote

You can also define your graph outside of data objects, e.g.

class Dataset(...):
     def __init__(self, ...):
          self.edge_index = ...
          self.data, self.slices = torch.load(self.processed_paths[0])
      def __getitem__(self, idx):
          data = super().__getitem__(self, idx)
          data.edge_index = self.edge_index
          return data

Replies: 1 comment 1 reply

Comment options

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

Answer selected by ralfriegel5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants