Understanding how to batch multiple graphs with the same number of nodes. #5434
-
Hi, I'm trying to implement a graph classification model and I'm struggling to understand how to properly batch a list of graphs and feed them into the model. All my graphs are stored in a list and are of the form
For some reason whenever I try to run this I get the error |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
Hi @AlexNiko47 In Now I have a question, does 978 denote the feature dimension or not? If it does, there must something wrong with your data as it has only one node in each batch. |
Beta Was this translation helpful? Give feedback.
Hi @AlexNiko47
In
Data
,x
must have at least 2 dims, indicating[num_nodes, num_features]
. ADataLoader
would stack the node featurex
at the first dimension from each batch by default. So you got 1x1956 as input with batch size 2.Now I have a question, does 978 denote the feature dimension or not? If it does, there must something wrong with your data as it has only one node in each batch.