Replies: 1 comment 4 replies
-
Sorry for the late reply. I assume you want to combine all different samples across all nodes, right? In this case, you should do data1 = Data(edge_index=edge_index, x=torch.stack([x_row_1, x_row_3, x_row_6], dim=0))
data1 = Data(edge_index=edge_index, x=torch.stack([x_row_2, x_row_3, x_row_6], dim=0))
data1 = Data(edge_index=edge_index, x=torch.stack([x_row_1, x_row_4, x_row_6], dim=0))
data1 = Data(edge_index=edge_index, x=torch.stack([x_row_2, x_row_4, x_row_6], dim=0))
data1 = Data(edge_index=edge_index, x=torch.stack([x_row_1, x_row_5, x_row_6], dim=0))
data1 = Data(edge_index=edge_index, x=torch.stack([x_row_2, x_row_5, x_row_6], dim=0)) |
Beta Was this translation helpful? Give feedback.
4 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.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I am trying to solve a regression problem using GNN.
I have a dataset. I managed to model the problem as a static graph, with a fixed number of nodes, and fixed number of features. However, dataset contains different size of samples for each node's features.
To give an example, the following csv file contains 3 nodes {0, 1, 2}. However, we have 3 samples for node 1, and 2 samples for node 0 and 1 for node 2.
The size of this csv file is S x F (Samples x Features)
The content of
dataset.csv
I am trying to explore how to do that using PG. I checked this discussion. My understanding is that we can batch node features (feature1,feature2,feature3 in my case) with shape [B, N, F] and a sparse single adjacency matrix edge_index with shape [2, E],
We can use InMemoryDataset class to wrap this, but I just want to give a quick example.
Question:
In case we have different size of samples for each node's features, is this OK, or does the implementation consider the number of samples to be equal when batching them?.
Beta Was this translation helpful? Give feedback.
All reactions