From the doc of dgl.dataloading.MultiLayerNeighborSampler
:
fanouts: List of neighbors to sample per edge type for each GNN layer, starting from the first layer.
If I train a graphSAGE model with 3 layers using dgl.dataloading.EdgeDataLoader
, according to https://docs.dgl.ai/guide/minibatch.html, to my understanding, the first layer contains all the input nodes (3-hop neighbors of the output nodes). The second layer contains 2-hop neighbors and the third layer contains 1-hop neighbors.
My question is: does the fanouts
parameter follows this order? If fanouts=[10, 15, 20]
, does this mean 20 neighbors will be sampled from 1-hop neighbors for layer-3, 15 from 2-hop neighbors for layer-2 and 10 from 3-hop neighbors for layer-1?