MCPcopy
hub / github.com/THUDM/CogDL / load_dataset

Function load_dataset

examples/graphmae/graphmae/datasets/data_util.py:34–48  ·  view source on GitHub ↗
(dataset_name)

Source from the content-addressed store, hash-verified

32
33
34def load_dataset(dataset_name):
35 dataset = build_dataset_from_name(dataset_name)
36 if dataset_name == "ogbn-arxiv":
37 graph = dataset[0]
38 feat = graph.x
39 feat = scale_feats(feat)
40 graph.x = feat
41
42 else:
43 graph = dataset[0]
44 graph.add_remaining_self_loops()
45
46 num_features = graph.x.shape[1]
47 num_classes = dataset.num_classes
48 return graph, (num_features, num_classes)
49
50def load_inductive_dataset(dataset_name):
51 dataset = build_dataset_from_name(dataset_name)

Callers 1

mainFunction · 0.90

Calls 3

build_dataset_from_nameFunction · 0.90
scale_featsFunction · 0.70

Tested by

no test coverage detected