Single underlying graph #2774
Unanswered
adhikarirsr
asked this question in
Q&A
Replies: 1 comment 3 replies
-
I think you can simply set these values as an attribute to class MyDataset(InMemoryDataset):
def __init__(self):
super().__init__(...)
self.data, self.slices = torch.load(self.processed_paths[0])
self.edge_index = torch.load('link to saved edge_index')
def process(self):
...
torch.save(edge_index, 'link to saved edge index') |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have a single underlying graph (let's say for a picture the graph is a grid graph with some edge_weight). So, when I create
Dataset
, I do not want to have that graph (edge_index and edge_weight) as a part of every data. I should be able to refer to one edge_index and one edge_weight value from the memory. This would save lots of memory, right? Is PyG already doing that? If not then how can I do so?Beta Was this translation helpful? Give feedback.
All reactions