How to pass message inversely through an edge?

Hi, I’d like to reproduce Gated Graph Neural Networks using DGL.
I’m wondering how to pass message inversely through an edge, as the model mentioned in the paper uses features of nodes connected by both incoming and outgoing edges separately.

Check out dgl.reverse. It returns a graph whose all edges are the of the reverse direction. If you pass share_ndata=True, then the returned graph will share node features with the input graph. You can then perform message passing on the two graphs alternatively using different UDFs. Since they share node features, the change can be seen by both graphs.

I’ll have a try. Thanks!

Any luck with Gated Graph Neural Networks on DGL?

Hi Acho,

Could you please provide more details on what trouble you, ideally in the form of equations? See if I can do a hack.

Not really, I was just wondering if there was any publicly available implementation for GGNN on DGL, as implementing multiple GNNs is rather time consuming. I’ll implement it myself otherwise. Thank you.