Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Oct 31, 2023
1 parent 2b7c2fb commit 9efe2fd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pyg_lib/csrc/sampler/cpu/neighbor_kernel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -226,8 +226,8 @@ class NeighborSampler {
at::Tensor index;
if (replace) {
index = at::multinomial(weight, count, replace);
}
else { // An Efficient Algorithm for Biased Sampling: https://utopia.duth.gr/~pefraimi/research/data/2007EncOfAlg.pdf
} else { // An Efficient Algorithm for Biased Sampling:
// https://utopia.duth.gr/~pefraimi/research/data/2007EncOfAlg.pdf
const auto rand = at::empty_like(weight).uniform_();
const auto key = (rand.log() / weight);
index = std::get<1>(key.topk(count));
Expand Down

0 comments on commit 9efe2fd

Please sign in to comment.