Multi-inputs for HeteroGraphConv?

Hi, I have a problem that if the neural networks in mods of dglnn.HeteroGraphConv require two more inputs, such as node_features and edge_features. For example,

mods = {
    'A-B': dglnn.CFConv(3, 3, 3, 3), 
    'B-C': dglnn.CFConv(3, 3, 3, 3), 
    'A-C': dglnn.CFConv(3, 3, 3, 3)

model = dglnn.HeteroGraphConv(mods=mods, aggregate='sum')

dglnn.HeteroGraphConv.forward receive g and feats, but dglnn.CFConv receive g, node_feats and edge_feats. How to handle with this condition? Thank you.

Currently you will need to write a module yourself to support that. Note that CFConv currently only supports graphs of a single node type and you may need to modify that as well.

HeteroGraphConv's forward has two additional argument mod_args and mod_kwargs. You can give a dictionary whose keys are edge types and values are tuples for mod_args (or dicts for mod_kwargs).

However as far as I know CFConv does not work on heterogeneous graph, so you will need to write your own module for that.

Thank you very much. Is there an example in dgl that implement a GCN which supports multi node types?

Sorry for the late reply, see this PR.

Thank you very much. I’ve fix this problem. :rofl: