Replies: 1 comment 5 replies
-
If there exists some graphs who miss node types or edge types, you need to create dummy tensors for them, e.g.: data[node_type].x = torch.empty(0, 64) # A feature matrix with 64 features but zero nodes
data[edge_type].edge_index = torch.empty(2, 0, dtype=torch.long) # A matrix with zero edges |
Beta Was this translation helpful? Give feedback.
5 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 around 4000 heterodata objects in my dataset. But some nodes can be part of multiple graphs and all types of edges may not be present in all graphs. I have given a unique id for each node in each heterodata object. Do the node ids for these nodes needs to be unique across dataset?
While training I get the following error:
File "<eval_with_key>.5", line 110, in forward
pool_3 = torch.add(pool__nodetype1, pool__nodetype2); pool__nodetype1 = pool__nodetype2 = None
RuntimeError: The size of tensor a (64) must match the size of tensor b (62) at non-singleton dimension 0
I would like to know the reason and how to solve it
Beta Was this translation helpful? Give feedback.
All reactions