dgl.unbatch_hetero

dgl.unbatch_hetero(graph)[source]

Return the list of heterographs in this batch.

Parameters:graph (BatchedDGLHeteroGraph) – The batched heterograph.
Returns:A list of BatchedDGLHeteroGraph objects whose attributes are obtained by partitioning the attributes of the graph. The length of the list is the same as the batch size of graph.
Return type:list

Notes

Unbatching will break each field tensor of the batched graph into smaller partitions.

For simpler tasks such as node/edge state aggregation, try to slice graphs along edge types and use readout functions.

See also

batch_hetero()