diff --git a/gnes/encoder/numeric/vlad.py b/gnes/encoder/numeric/vlad.py index d8d1cb0b..433a0c97 100644 --- a/gnes/encoder/numeric/vlad.py +++ b/gnes/encoder/numeric/vlad.py @@ -47,8 +47,8 @@ def faiss_index(self): def kmeans_pred(self, vecs): if self.using_faiss_pred: - D, I = self.index_flat.search(vecs.astype(np.float32), 1) - return np.reshape(I, [-1]) + _, pred = self.index_flat.search(vecs.astype(np.float32), 1) + return np.reshape(pred, [-1]) else: vecs = np.reshape(vecs, [vecs.shape[0], 1, 1, vecs.shape[1]]) dist = np.sum(np.square(vecs - self.centroids), -1)