Skip to content

Commit

Permalink
Small changes
Browse files Browse the repository at this point in the history
  • Loading branch information
OlhaBabicheva committed Oct 31, 2023
1 parent 225785d commit 80d5834
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 @@ -233,8 +233,8 @@ class NeighborSampler {
}
else {
const auto rand = at::empty_like(weight).uniform_();
const auto a = (rand.log() / weight);
const auto index = std::get<1>(a.topk(count));
const auto key = (rand.log() / weight);
const auto index = std::get<1>(key.topk(count));
const auto index_data = index.data_ptr<int64_t>();
for (size_t i = 0; i < index.numel(); ++i) {
add(row_start + index_data[i], global_src_node, local_src_node,
Expand Down

0 comments on commit 80d5834

Please sign in to comment.