diff --git a/cpu/sampler.cpp b/cpu/sampler.cpp index 658460a3..133e8b9a 100644 --- a/cpu/sampler.cpp +++ b/cpu/sampler.cpp @@ -1,9 +1,7 @@ -#include #include at::Tensor neighbor_sampler(at::Tensor start, at::Tensor cumdeg, size_t size, float factor) { - at::CPUGenerator *generator = at::detail::getDefaultCPUGenerator(); auto start_ptr = start.data(); auto cumdeg_ptr = cumdeg.data(); @@ -24,7 +22,7 @@ at::Tensor neighbor_sampler(at::Tensor start, at::Tensor cumdeg, size_t size, std::unordered_set set; if (size_i < 0.7 * float(num_neighbors)) { while (set.size() < size_i) { - int64_t z = generator->random() % num_neighbors; + int64_t z = rand() % num_neighbors; set.insert(z + low); } std::vector v(set.begin(), set.end()); diff --git a/setup.py b/setup.py index 4f9fb59e..a5c6de38 100644 --- a/setup.py +++ b/setup.py @@ -29,7 +29,7 @@ ['cuda/rw.cpp', 'cuda/rw_kernel.cu']), ] -__version__ = '1.4.3a1' +__version__ = '1.4.3' url = 'https://github.com/rusty1s/pytorch_cluster' install_requires = ['scipy'] diff --git a/torch_cluster/__init__.py b/torch_cluster/__init__.py index f060fdde..87730886 100644 --- a/torch_cluster/__init__.py +++ b/torch_cluster/__init__.py @@ -7,7 +7,7 @@ from .rw import random_walk from .sampler import neighbor_sampler -__version__ = '1.4.3a1' +__version__ = '1.4.3' __all__ = [ 'graclus_cluster',