mantra.datasets
Datasets module
This module contains datasets describing triangulations of manifolds,
following the API of pytorch-geometric
.
- class mantra.datasets.ManifoldTriangulations(root, manifold='2', version='latest', transform=None, pre_transform=None, pre_filter=None, force_reload=False)
- __init__(root, manifold='2', version='latest', transform=None, pre_transform=None, pre_filter=None, force_reload=False)
The dataset class for the manifold triangulations.
Parameters
- manifold: string
Wether to use the 2 or 3 manifolds. The 2-manifold consist of all surfaces with up to 10 vertices. The 3-manifolds consist of volumes with up to 10 vertices.
- version: string
Version of the dataset to use. The version should correspond to a released version of the dataset, all of which can be found on GitHub. By default, the latest version will be downloaded. Unless specific reproducibility requirements are to be met, using
latest
is recommended.
- property raw_file_names
Stores the raw file names that need to be present in the raw folder for downloading to be skipped. To reference raw file names, use the property self.raw_paths.
- property processed_file_names
Stores the processed data in a file, if this file is present in the processed folder, it will skip processing. Othewise it will run the process function.
- download() None
Downloads the specified version of the 2 or 3 manifolds in json format into the raw folder and extracts the results. The dataset version can specified when instantiating the class.
- process()
Processes the raw json file and loads the result into a torch-geometric dataset. If provided during initialization, pretransforms and/or prefilters are applied before saving the preprocessed dataset. More information on pretransforms and prefilters can be found in the pytorch-geometric documentation.