Last active
September 28, 2022 05:06
-
-
Save tomonori-masui/88ebd1810fc5c9e03e42676f7d68ac87 to your computer and use it in GitHub Desktop.
Splitting links to train, valid, test
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import torch_geometric.transforms as T | |
split = T.RandomLinkSplit( | |
num_val=0.05, | |
num_test=0.1, | |
is_undirected=True, | |
add_negative_train_samples=False, | |
neg_sampling_ratio=1.0, | |
) | |
train_data, val_data, test_data = split(graph) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment