Replies: 1 comment 3 replies
-
In this case, I think you have to use padding, i.e. filling your features with zero and align their shapes. |
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.
-
Hi all,
I am trying to create a PyG dataset using
DataLoader
from a list of graphs each having the same number of nodes but different number of features. Please see the snippet of the code below where the size of the window(data points) changes in every loop. I also tried solving it with pair graphs but it did not work. I am getting the following errors while collating. Any help or hit is greatly appreciated.RuntimeError: ` File "c:\Users.....\dataloader.py", line 106, in process
data, slices = self.collate(sequences)
File "C:\Users.....\Python39\lib\site-packages\torch_geometric\data\in_memory_dataset.py", line 111, in collate
data, slices, _ = collate(
File "C:\Users....\Python39\lib\site-packages\torch_geometric\data\collate.py", line 84, in collate
value, slices, incs = _collate(attr, values, data_list, stores,
File "C:\Users....\Python39\lib\site-packages\torch_geometric\data\collate.py", line 150, in _collate
value = torch.cat(values, dim=cat_dim or 0, out=out)
RuntimeError: Sizes of tensors must match except in dimension 0. Expected size 40 but got size 90 for tensor number 1 in the list.`
a snippet of code: `
data = pd.read_csv(fileName, header=0, index_col=0).values
Beta Was this translation helpful? Give feedback.
All reactions