torch_geometric.datasets.graph_generator.GridGraph

class GridGraph(height: int, width: int, dtype: Optional[dtype] = None)[source]

Bases: GraphGenerator

生成二维网格图。 有关更多信息,请参见grid()

Parameters:
  • height (int) – 网格的高度。

  • width (int) – 网格的宽度。

  • dtype (torch.dtype, 可选) – 返回的位置张量的期望数据类型。(默认: None)