• n_node (int, 可选) - 目标图的节点计数。默认值：None

• mode (PadMode, 可选) - Pad模式，如果选择 PadMode.CONST，虚构图将具有n_node数量的节点和n_edge数量的边。如果为 PadMode.AUTO，虚构图的node_count和edge_count是根据输入图的大小通过 $$n\_node = 2^{\text{ceil}(\log_{2}(input\_graph.node\_count))}$$$$n\_edge = 2^{\text{ceil}(\log_{2}(input\_graph.edge\_count))}$$ 计算的。默认值：mindspore_gl.graph.PadMode.AUTO

• n_edge (int, 可选) - 目标图的边计数。默认值：None

• csr (bool, 可选) - 是否为CSR图。默认值：False

• graph (MindHomoGraph) - 输入图。

MindHomoGraph，填充图。

Ascend GPU

>>> from mindspore_gl.graph.ops import BatchHomoGraph, PadHomoGraph, PadMode
>>> import numpy as np
>>> from mindspore_gl.graph.graph import MindHomoGraph
>>> graph_list = []
>>> for _ in range(1):
...     graph = MindHomoGraph()
...     edges = np.array([[0, 2, 2, 3, 4, 5, 5, 6], [1, 0, 1, 5, 3, 4, 6, 4]])
...     graph.set_topo_coo(edges)
...     graph.node_count = 7
...     graph.edge_count = 8
...     graph_list.append(graph)
>>> batch_fn = BatchHomoGraph()
>>> batch_graph = batch_fn(graph_list)
>>> n_node = graph.node_count + 1
>>> n_edge = graph.edge_count + 30