Is it possible to implement diffpool with DGL?

I want to import diffpool using DGL, but I am unsure whether the gradient will flow through the creation of dgl.Graph() objects. For instance, in the paper at equation 4 we make a new adjacency for the coarsened graph. This adjacency calculation comes through some tensors that should have gradients attached to them; if I then used the adjacency to make a new dgl.Graph() object to then use in a GNN further downstream, would the gradients from the adjacency be preserved or not?

It might be that I just have to implement everything manually.

It’s a bit tricky because the later graph in Diffpool is not real graph. We have an example at dgl/examples/pytorch/diffpool at master · dmlc/dgl · GitHub

Thanks @VoVAllen – I have since been able to implement it using PyTorch Geometric :slight_smile:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.