Skip to content
Discussion options

You must be logged in to vote

My question above seems to be the same as the one discussed in this issue on GraphSAINTRandomWalkSampler, which, however, doesn't outline an example solution. I guess the sampler needs to be instantiated using as input a graph dataset on CPU, and then the device conversion (e.g., to(device)) needs to be applied to each mini-batch.

For instance

loader = GraphSAINTNodeSampler(
        graph,
        batch_size=128,
        num_steps=100,
        sample_coverage=100
    )

and then

for mini_batch in loader:
    mini_batch = mini_batch.to(device)

Would that be the intended usage?

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@rusty1s
Comment options

Answer selected by sdesabbata
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants