Hey all,
I was wondering if the node’s features are not an integer but a list or an array? For example, I have 5 features and each of them has a different length.
featA=[[0,0],[1,1],[1,1]…]
featB=[[0,0],[0,0],[1,1]…]
featC=[[0,0],[0,0],[1,1]…]
featD=[[0,0,1],[0,1,1],[1,1,1]…]
featE=[[0,0,1],[0,1,1],[1,1,1]…]
I constructed my GCN layers as followed:
# input layer
self.layers.append(GraphConv(5, 5, activation=activation))
# hidden layers
self.layers.append(GraphConv(5, 100, activation=activation))
self.layers.append(GraphConv(100, 66, activation=activation))
self.layers.append(GraphConv(66, 30, activation=activation))
self.layers.append(GraphConv(30, 3, activation=activation))
# output layer
self.layers.append(GraphConv(3, 2))
However, I got an error says “ValueError: Expected target size (94372, 2), got torch.Size([94372])
” with 94372 is the total nodes i used for training.
Does anybody have this problem before? Thanks