Commit fd427873 authored by Matthijs Douze's avatar Matthijs Douze Committed by GitHub

Fix bug in chain training.

parent 12f181ee
......@@ -790,7 +790,7 @@ IndexPreTransform::~IndexPreTransform ()
void IndexPreTransform::train (idx_t n, const float *x)
{
int last_untrained = 0;
if (index->is_trained) {
if (!index->is_trained) {
last_untrained = chain.size();
} else {
for (int i = chain.size() - 1; i >= 0; i--) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment