[Neighborhood Sampler] Sample twice with same input nodes(root node) #4792
Answered
by
rusty1s
Junseok0207
asked this question in
Q&A
-
I want to sample different neighbors twice with same input(root) nodes. I change the transform_fn on NeighborLoader and call on NeighborSampler like this
|
Beta Was this translation helpful? Give feedback.
Answered by
rusty1s
Jun 13, 2022
Replies: 1 comment 3 replies
-
How about doing this on a Python-level? sampler = torch.utils.data.RandomSampler(range(num_nodes))
loader1 = NeighborLoader(data, sampler=sampler, ...)
loader2 = NeighborLoader(data, sampler=sampler, ...)
for data1, data2 in zip(loader1, loader2):
pass |
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
Junseok0207
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
How about doing this on a Python-level?