We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When testing with the following codes
torch.manual_seed(1234) start = torch.tensor([0, 1]) cumdeg = torch.tensor([0, 3, 7]) neighbor_sampler(start, cumdeg, size=2)
we cannot get consistent bebaviors with multiple runs as expected in test_sampler.py.
The reason for such inconsistence is that the sampling code in cpu has two sampling branches:
if (size < 0.7 * float(num_neighbors)) { ...... int64_t sample = rand() % num_neighbors; ...... } else { auto sample = torch::randperm(num_neighbors, start.options()); ...... }
The upper branch utilizes the rand function provided by C++, which causes this inconsistence.
rand
C++
Maybe we should leverage similar functions provided by PyTorch, which can be controlled by 'torch.manual_seed()'?
PyTorch
The text was updated successfully, but these errors were encountered:
This issue had no activity for 6 months. It will be closed in 2 weeks unless there is some new activity. Is this issue already resolved?
Sorry, something went wrong.
No branches or pull requests
When testing with the following codes
we cannot get consistent bebaviors with multiple runs as expected in test_sampler.py.
The reason for such inconsistence is that the sampling code in cpu has two sampling branches:
The upper branch utilizes the
rand
function provided byC++
, which causes this inconsistence.Maybe we should leverage similar functions provided by
PyTorch
, which can be controlled by 'torch.manual_seed()'?The text was updated successfully, but these errors were encountered: