Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions faiss/impl/index_read.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -821,6 +821,10 @@ static void read_AdditiveQuantizer(AdditiveQuantizer& aq, IOReader* f) {
}

aq.set_derived_values();
FAISS_THROW_IF_NOT_FMT(
aq.code_size > 0,
"invalid AdditiveQuantizer: nbits sum to 0 bits, code_size %zd",
aq.code_size);

// Sanity-check codebooks size without knowing the effective dimension.
// codebooks stores effective_d * total_codebook_size floats, so its
Expand Down
Loading