What is the block?

Hello, may anyone explain what the block is? I have met them in example/pinsage and I can’t understand how does they work

A block is a graph consisting of two sets of nodes: the source nodes and destination nodes. The source and destination nodes can have multiple node types. All the edges connect from source nodes to destination nodes.

Please refer to below links for more details:
https://docs.dgl.ai/generated/dgl.to_block.html#dgl-to-block
https://docs.dgl.ai/generated/dgl.create_block.html#dgl.create_block

1 Like

Also check out this tutorial: Introduction of Neighbor Sampling for GNN Training — DGL 0.8.1 documentation . There is an animation to illustrate what is a DGLBlock (also called message flow graph). Hope this will help!

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.