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

Batch a collection of DGLGraph and return a BatchedDGLGraph object that is independent of the graph_list.

  • graph_list (iterable) – A collection of DGLGraph to be batched.
  • node_attrs (None, str or iterable) – The node attributes to be batched. If None, the BatchedDGLGraph object will not have any node attributes. By default, all node attributes will be batched. If str or iterable, this should specify exactly what node attributes to be batched.
  • edge_attrs (None, str or iterable, optional) – Same as for the case of node_attrs

One single batched graph

Return type: