GraphConv’s forward function can pass in edge weights, but HeteroGraphConv’s forward function cannot pass in edge weights. How should I pass the weight to each dglnn.GraphConv?
class RGCN(nn.Module):
def init(self, lnc_in_feats, lnc_hid_feats, mi_in_feats, mi_hid_feats):
super().init()
self.conv1 = dglnn.HeteroGraphConv({
‘interact_lnc_lnc’:dglnn.GraphConv(lnc_in_feats,lnc_hid_feats),
‘interact_mi_mi’:dglnn.GraphConv(mi_in_feats,mi_hid_feats),
‘interact_lnc_mi’:dglnn.GraphConv(mi_in_feats,mi_hid_feats)
}, aggregate=‘stack’)
def forward(self, graph, inputs, edge_weight=edge_weight):
h = self.conv1(graph, inputs)