1

I'm trying to implement a graph convolutional network (GCN) in the Deep Graph Learning (DGL) package for Python. In many papers, edges have discrete features, and each possible value is associated with a different weight matrix or set of weight matrices. An example would be here. Is anyone familiar with how to implement a model like this in DGL? The DGL team's example of GCNs for graph classification, as does another example I found online.

John Kleve
  • 499
  • 1
  • 4
  • 12

1 Answers1

0

Not sure whether the question still needs to be answered, but I guess it boils down to how to implement models like R-GCN or HGT with DGL. Some of these layers come build-in with DGL here. But it is also easy to implement your own computations. The following explanation only makes sense if you know the basic computational process of DGL during a forward pass through a graph layer (message, reduce, apply_node), if not DGL has good tutorials on that as well. To extend the usual graph computation to for example edges of different types you need to create a heterogenous Graph object and call multi_update_all on that graph object. You can pass a dictionary to that function which specifies the computation per edge type.

Niklas Höpner
  • 364
  • 2
  • 4