A potential bug in DGL examples

The code in DGL github: dgl/examples/pytorch/graphsage/node_classification.py at line 93

Validation should be conducted using MultiLayerFullNeighborSampler but not NeighborSampler which is the same as the train_dataloader?

It depends. The results from a NeighborSampler with randomly sampled neighbors are unbiased estimations of results from a MultiLayerFullNeighborSampler. And that’s also why we can use such sampling during training. Of course, if you want results with lower variance, you can definitely use a MultiLayerFullNeighborSampler instead.

1 Like