data
Defines a container for graphs and the means to process them in TensorFlow.
This package defines a container (dataset) of graphs, based on the class of the same name in Spektral.
The package also defines two loaders for datasets, based on the loaders defined in Spektral.
The Graph class from Spektral can be imported from this package, and used for the definition of datasets.
The package contains the following classes:
GraphDatasetSingleGraphLoaderMultipleGraphLoader
Dataset ¶
Bases: Dataset
Container for graphs.
This class is supposed to be extended by overriding the read and download methods. See Spektral's documentation for additional information, as this class is directly derived from Spektral's Dataset class.
Attributes:
-
name–A string name for the dataset.
Parameters:
-
name(str) –The name for the dataset.
-
**kwargs(Any, default:{}) –The keyword arguments to pass to Spektral's
Datasetclass constructor.
Source code in libmg/data/dataset.py
SingleGraphLoader ¶
Bases: SingleLoader
Loads a dataset made up by a single graph to be used by a TensorFlow model.
Once instantiated, call the load method to obtain the generator that can be used with TensorFlow APIs.
See Spektral's documentation for additional information,
as this class is directly derived from Spektral's SingleLoader class.
Source code in libmg/data/loaders.py
MultipleGraphLoader ¶
Bases: DisjointLoader
Loads a dataset made up by more than one graph to be used by a TensorFlow model.
Once instantiated, call the load method to obtain the generator that can be used with TensorFlow APIs.
See Spektral's documentation for additional information,
as this class is directly derived from Spektral's DisjointLoader class.