Skip to content

Commit c1a8110

Browse files
committed
Fix is_trained in IndexNSGSQ (#3145)
Summary: Same as facebookresearch/faiss#3034 When using IndexNSGSQ with fp16, do not require training Pull Request resolved: facebookresearch/faiss#3145 Reviewed By: algoriddle Differential Revision: D51615536 Pulled By: mdouze fbshipit-source-id: c6bfbca920be80231d5d0a7290a29f17ea271f6e
1 parent aed7575 commit c1a8110

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

faiss/IndexNSG.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ IndexNSGSQ::IndexNSGSQ(
309309
int M,
310310
MetricType metric)
311311
: IndexNSG(new IndexScalarQuantizer(d, qtype, metric), M) {
312-
is_trained = false;
312+
is_trained = this->storage->is_trained;
313313
own_fields = true;
314314
}
315315

0 commit comments

Comments
 (0)