Skip to content

Commit

Permalink
Add todo comment
Browse files Browse the repository at this point in the history
  • Loading branch information
sanketkedia committed Dec 5, 2024
1 parent 3c9f1f1 commit d72dd6f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions rust/index/src/spann/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,7 @@ fn init_centers(
let mut lambda = 0.0;
// Randomly choose centers.
for _ in 0..num_iters {
// TODO(Sanket): Instead of copying full centers, we can use indices to avoid copying.
let mut centers = vec![vec![0.0; input.embedding_dimension]; input.k];
for center in centers.iter_mut() {
let random_center = rand::thread_rng().gen_range(input.first..batch_end);
Expand Down

0 comments on commit d72dd6f

Please sign in to comment.