mlx_graphs.loaders.Dataloader

mlx_graphs.loaders.Dataloader#

class mlx_graphs.loaders.Dataloader(dataset: Dataset | Sequence[GraphData], batch_size: int = 1, shuffle: bool = False)[source]#

Default data loader to batch and iterate over multiple graphs.

Parameters:
  • dataset (Union[Dataset, Sequence[GraphData]]) – Dataset or list of GraphData to batch and iterate over

  • batch_size (int) – Number of graphs to load per batch. Defaults to 1

  • shuffle (bool) – Whether to reshuffle the order of graphs within each batch. Defaults to False

__init__(dataset: Dataset | Sequence[GraphData], batch_size: int = 1, shuffle: bool = False)[source]#

Methods

__init__(dataset[, batch_size, shuffle])