When I use the sum of all node features as GNN model forward function’s return, the batch doesn’t work. Is there any alternative to the sum function ?
my code looks like
def forward(self, g, h):
g.edata['h'] = h
h = self.nn_layers(h) # (V, edge_out_feats) V is the number of edges
return h.sum