-
Hi, I am developing a model for the node regression task, I have generated a heterogeneous graph dataset, which contains multiple graphs. I want to predict the value of a "wire" node, which is always set as the last node of this type of node during dataset generation, so I want to achieve the aggregated feature of this node after two GCNs, I write it like: And my plan is to connect two GCNs to an MLP, which contains 3 hidden layers. Here is my code
In which "out_channels_gcn" of the second GCN is also the size of MLP's input layer, "hidden_layer_size_mlp" is defined as a list, e.g. [10,20] stands for the first hidden layer and the second hidden layer of In "forward", x_gcn_mlp is initially set to 0, it will receive the tensors of "x["wire"][0,-1]" and propagate further through MLP. I batch multiple graphs into the training and testing batches just use the train_test_split from sklearn, and create dataloader like:
And then train:
I get errors "'tuple' object has no attribute 'size'", it points to I would appreciate it if anyone could give me a solution and many thanks in advance. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 6 replies
-
I think the issue is that you cannot use |
Beta Was this translation helpful? Give feedback.
I think the issue is that you cannot use
GCNConv
for bipartite message passing. Can you swap out this operator for something likeSAGEConv
?