Fixed index version not being written to the index file on train_index() in infer-web.py

This commit is contained in:
Mangio621
2023-05-18 02:42:09 +10:00
parent 6fb1f8c1b1
commit 3e874c6630

View File

@@ -801,7 +801,7 @@ def train_index(exp_dir1, version19):
index.add(big_npy[i : i + batch_size_add])
faiss.write_index(
index,
"%s/added_IVF%s_Flat_nprobe_%s.index" % (exp_dir, n_ivf, index_ivf.nprobe),
"%s/added_IVF%s_Flat_nprobe_%s_%s.index" % (exp_dir, n_ivf, index_ivf.nprobe, version19),
)
infos.append(
"成功构建索引added_IVF%s_Flat_nprobe_%s_%s.index"