Hello, I have a problem that the dglnn.HeteroGraphConv.forward
only requires two inputs, but myOwnConv.forward
requires more inputs, seem like:
self.layers.append(
dglnn.HeteroGraphConv(
{
etype: myOwnConv(edge_dim, num_etypes, hidden_dim, hidden_dim,
heads[0], dropout, dropout, negative_slope,
False, self.activation, alpha=alpha)
for etype in etypes
}
)
)
# The forward of myOwnConv: def forward(self, graph, feat, edge_feat, res_attn)
So, when I call:
res_attn = None
for l, (layer, block) in enumerate(zip(self.layers, blocks)):
h, res_attn = layer(block, h, edge_feat, res_attn=None)
I will got an error TypeError: forward() got an unexpected keyword argument 'res_attn'
. How to solve this conflict?
Anyone help?