torch_geometric.datasets.graph_generator.GridGraph

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

Bases: GraphGenerator

Generates two-dimensional grid graphs. See grid() for more information.

Parameters:
  • height (int) – The height of the grid.

  • width (int) – The width of the grid.

  • dtype (torch.dtype, optional) – The desired data type of the returned position tensor. (default: None)