I am new to dgl, and I am confused about how to stack a GCN layer over LSTM layer, for example, given a batch of sentences, how to implement such models.
You can either
- fetch graph related features from
DGLGraph
objects and perform LSTM computation independent of dgl and then put them back intoDGLGraph
objects if necessary.
Or
- Use APIs like
apply_edges
orapply_nodes
to update edge or node features withinDGLGraph
objects.