Skip to content

Instantly share code, notes, and snippets.

@tomonori-masui
Last active September 28, 2022 05:08
Show Gist options
  • Select an option

  • Save tomonori-masui/924bf4c664cfe0e6c822cc6d3a6b932f to your computer and use it in GitHub Desktop.

Select an option

Save tomonori-masui/924bf4c664cfe0e6c822cc6d3a6b932f to your computer and use it in GitHub Desktop.
Randomly split nodes in a graph
import torch_geometric.transforms as T
split = T.RandomNodeSplit(num_val=0.1, num_test=0.2)
graph = split(graph)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment