egc.utils.data_loader package
Submodules
egc.utils.data_loader.naive_data_loader module
Naive Graph Batch Data Loader
- class egc.utils.data_loader.naive_data_loader.NaiveDataLoader(graph: DGLGraph, batch_size: int = 1024, n_layers: int = 1, fanouts: List[int] = -1, aug_types: List | None = None, device: device = device(type='cpu'), drop_last: bool = False)[source]
Bases:
objectNaive DataLoader using full neighbor sampler
- Parameters:
graph (dgl.DGLGraph) – graph.
batch_size (int, optional) – batch size. Defaults to 1024.
n_layers (int, optional) – GNN layers. Defaults to 1.
fanout (List[int] or int, optional) –
List of neighbors to sample for each GNN layer, with the i-th element being the fanout for the i-th GNN layer.Defaults to -1.
If only a single integer is provided, DGL assumes that every layer will have the same fanout.
If -1 is provided on one layer, then all inbound edges will be included.
aug_types (List, optional) – augmentation types list. Defaults to [“none”].
drop_last (bool, optional) – set to True to drop the last incomplete batch. Defaults to False.
- Raises:
ValueError – raise if exists any augmentation type not supported
Module contents
Data Loaders