I saw the answer in FAQ 1. Are DGLGraphs directed or not? How to represent an undirected graph?
" All DGLGraphs are directed. To represent an undirected graph, you need to create edges for both directions. dgl.to_bidirected can be helpful, which converts a DGLGraph into a new one with edges for both directions."
But in my use case it’s not suitable to do so for memory issues (graph with about one million of edges and a high dimension space for edge feature).
Is there anyway to aggregate features from both incoming AND outgoing edges when updating nodes.
With the message-passing design of DGL, I assume that
g.update_all(fn.copy_e('he', 'm'), fn.sum('m', 'he_aggr'))
will only aggregate features from incoming edges.
It seems that this functionality exists in PyTorch Geometrics (parameter “flow” of message passing method : torch_geometric.nn — pytorch_geometric 2.0.0 documentation ) as in graphnets library (parameters “use_received_edges” and “use_sent_edges” for NodeBlock: graph_nets/blocks.py at master · deepmind/graph_nets · GitHub )