torch_geometric.datasets.GNNBenchmarkDataset
- class GNNBenchmarkDataset(root: str, name: str, split: str = 'train', transform: Optional[Callable] = None, pre_transform: Optional[Callable] = None, pre_filter: Optional[Callable] = None, force_reload: bool = False)[source]
Bases:
InMemoryDataset来自“基准测试图神经网络”论文的各种人工和半人工生成的图数据集。
注意
ZINC数据集通过
torch_geometric.datasets.ZINC提供。- Parameters:
root (str) – Root directory where the dataset should be saved.
name (str) – 数据集的名称(可以是
"PATTERN","CLUSTER","MNIST","CIFAR10","TSP","CSL"中的一个)split (str, optional) – If
"train", loads the training dataset. If"val", loads the validation dataset. If"test", loads the test dataset. (default:"train")transform (callable, optional) – A function/transform that takes in an
torch_geometric.data.Dataobject and returns a transformed version. The data object will be transformed before every access. (default:None)pre_transform (callable, optional) – A function/transform that takes in an
torch_geometric.data.Dataobject and returns a transformed version. The data object will be transformed before being saved to disk. (default:None)pre_filter (callable, optional) – A function that takes in an
torch_geometric.data.Dataobject and returns a boolean value, indicating whether the data object should be included in the final dataset. (default:None)force_reload (bool, optional) – Whether to re-process the dataset. (default:
False)
统计:
名称
#图表
#节点
#edges
#特性
#classes
模式
14,000
~118.9
~6,098.9
3
2
集群
12,000
~117.2
~4,303.9
7
6
MNIST
70,000
~70.6
~564.5
3
10
CIFAR10
60,000
~117.6
~941.2
5
10
旅行商问题
12,000
~275.4
~6,885.0
2
2
CSL
150
~41.0
~164.0
0
10