How to combine DGL with other neural network models?


Hi, DGL is a graceful tool for graph learning.
However, it seems that there is no tutorial or examples in DGL to combine the existing models easily?
For example,

G.ndata['feature'] = features

note the node features are derived from other modules (e.g., a CNN/RNN feature extractor), so in this way, would the whole pytorch computation graph be complete for backpropagation?

Or, if we have obtained the results of GCN Layers, such as:

x = self.gcn1(g, features)
x = self.gcn2(g, x)

If I continue to conduct other operations on x or part columns of x, can the computation graph be complete?



Everything in DGL will maintain the backpropagation trace. You can use this with other model in any way as you want.


Thanks. I’ll try it to combine with others.