Hi,
First, of all, thanks so much for this amazing graph computing framework!! Can I ask questions about the mailbox for BatchNode?
In our experiment, we have a batch of graphs with different structures. We build a python list to contain those graphs, then construct BatchGraph using dgl_bg = dgl.batch(batched_graphs)
, and feed it into our GCN model.
Here is the printed result of input graph feature(each line is a node representation), edges.src['feat']
(source node representation of each edge) and mailbox information of each nodes. The printing code defined in gcn_msg
and gcn_reduce
function.
According to my understanding, each line in edges.src['feat']
should be the same as the corresponding line in mailbox. However, here, they are different from the printed result.
In addition, all my mailbox lines do not contain the source node representation. To prove this, I used one of the source node representations in function gcn_msg
, to test whether it exists in the the mailbox, but from the result(at the bottom in the following picture),
We can see that it is not contained in any mailbox row. So I am wondering why dgl just generates a random mailbox for me, instead of using the provided edge.src['feat']
? Another question is why the shape of mailbox is torch.Size([148, 1, 50])
instead of torch.Size([148, 50])
?
The following is my GCN related code