MCPcopy Create free account
hub / github.com/PyGCL/PyGCL / from_predefined_split

Function from_predefined_split

GCL/eval/eval.py:21–29  ·  view source on GitHub ↗
(data)

Source from the content-addressed store, hash-verified

19
20
21def from_predefined_split(data):
22 assert all([mask is not None for mask in [data.train_mask, data.test_mask, data.val_mask]])
23 num_samples = data.num_nodes
24 indices = torch.arange(num_samples)
25 return {
26 'train': indices[data.train_mask],
27 'valid': indices[data.val_mask],
28 'test': indices[data.test_mask]
29 }
30
31
32def split_to_numpy(x, y, split):

Callers 1

testFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected