dgl.batch_hetero(graph_list, node_attrs='__ALL__', edge_attrs='__ALL__')[source]

Batch a collection of DGLHeteroGraph and return a BatchedDGLHeteroGraph object that is independent of the graph_list.

  • graph_list (iterable) – A collection of DGLHeteroGraph to be batched.
  • node_attrs (None or dict) – The node attributes to be batched. If None, the resulted graph will not have features. If dict, it maps str to str or iterable. The keys represent names of node types and the values represent the node features to be batched for the corresponding type. By default, we use all features for all types of nodes.
  • edge_attrs (None or dict) – Same as for the case of node_attrs.

One single batched heterograph

Return type: