Skip to content

Commit

Permalink
Fix some typos (facebookresearch#2645)
Browse files Browse the repository at this point in the history
Summary: Pull Request resolved: facebookresearch#2645

Reviewed By: mdouze

Differential Revision: D42338453

Pulled By: algoriddle

fbshipit-source-id: 1ea5c33960a42c9e8624b10eba067e722d712e34
  • Loading branch information
chasingegg authored and facebook-github-bot committed Jan 4, 2023
1 parent f3577ab commit af833cd
Show file tree
Hide file tree
Showing 9 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion faiss/IndexBinaryIVF.h
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ struct IndexBinaryIVF : IndexBinary {
return invlists->list_size(list_no);
}

/** intialize a direct map
/** initialize a direct map
*
* @param new_maintain_direct_map if true, create a direct map,
* else clear it
Expand Down
2 changes: 1 addition & 1 deletion faiss/IndexIVF.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,7 @@ void IndexIVF::search_preassigned(
* that are in common between the two
******************************************************/

// intialize + reorder a result heap
// initialize + reorder a result heap

auto init_result = [&](float* simi, idx_t* idxi) {
if (!do_heap_init)
Expand Down
2 changes: 1 addition & 1 deletion faiss/IndexIVF.h
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ struct IndexIVF : Index, Level1Quantizer {
/// are the ids sorted?
bool check_ids_sorted() const;

/** intialize a direct map
/** initialize a direct map
*
* @param new_maintain_direct_map if true, create a direct map,
* else clear it
Expand Down
2 changes: 1 addition & 1 deletion faiss/IndexIVFFastScan.h
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ struct IndexIVFFastScan : IndexIVF {
size_t* nlist_out,
const Scaler& scaler) const;

// implem 14 is mukltithreaded internally across nprobes and queries
// implem 14 is multithreaded internally across nprobes and queries
template <class C, class Scaler>
void search_implem_14(
idx_t n,
Expand Down
2 changes: 1 addition & 1 deletion faiss/VectorTransform.h
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ struct RandomRotationMatrix : LinearTransform {
/// must be called before the transform is used
void init(int seed);

// intializes with an arbitrary seed
// initializes with an arbitrary seed
void train(idx_t n, const float* x) override;

RandomRotationMatrix() {}
Expand Down
2 changes: 1 addition & 1 deletion faiss/impl/LocalSearchQuantizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ void LocalSearchQuantizer::train(size_t n, const float* x) {
// allocate memory for codebooks, size [M, K, d]
codebooks.resize(M * K * d);

// randomly intialize codes
// randomly initialize codes
std::mt19937 gen(random_seed);
std::vector<int32_t> codes(n * M); // [n, M]
random_int32(codes, 0, K - 1, gen);
Expand Down
2 changes: 1 addition & 1 deletion faiss/impl/NNDescent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ void NNDescent::search(
// candidate pool, the K best items is the result.
std::vector<Neighbor> retset(L + 1);

// Randomly choose L points to intialize the candidate pool
// Randomly choose L points to initialize the candidate pool
std::vector<int> init_ids(L);
std::mt19937 rng(random_seed);

Expand Down
2 changes: 1 addition & 1 deletion faiss/impl/PolysemousTraining.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -905,7 +905,7 @@ void PolysemousTraining::optimize_ranking(
ScopeDeleter1<PermutationObjective> del(obj);

if (verbose > 0) {
printf(" m=%d, nq=%zd, nb=%zd, intialize RankingScore "
printf(" m=%d, nq=%zd, nb=%zd, initialize RankingScore "
"in %.3f ms\n",
m,
nq,
Expand Down
4 changes: 2 additions & 2 deletions faiss/impl/ProductQuantizer.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ struct ProductQuantizer : Quantizer {
Train_default,
Train_hot_start, ///< the centroids are already initialized
Train_shared, ///< share dictionary accross PQ segments
Train_hypercube, ///< intialize centroids with nbits-D hypercube
Train_hypercube_pca, ///< intialize centroids with nbits-D hypercube
Train_hypercube, ///< initialize centroids with nbits-D hypercube
Train_hypercube_pca, ///< initialize centroids with nbits-D hypercube
};
train_type_t train_type;

Expand Down

0 comments on commit af833cd

Please sign in to comment.