Format code (#228)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
parent
e3cb0485ce
commit
eb7caaa064
@ -779,7 +779,7 @@ def train1key(
|
|||||||
leng,
|
leng,
|
||||||
idx,
|
idx,
|
||||||
n_g,
|
n_g,
|
||||||
model_log_dir
|
model_log_dir,
|
||||||
)
|
)
|
||||||
yield get_info_str(cmd)
|
yield get_info_str(cmd)
|
||||||
p = Popen(
|
p = Popen(
|
||||||
@ -913,7 +913,8 @@ def train1key(
|
|||||||
index.train(big_npy)
|
index.train(big_npy)
|
||||||
faiss.write_index(
|
faiss.write_index(
|
||||||
index,
|
index,
|
||||||
"%s/trained_IVF%s_Flat_nprobe_%s.index" % (model_log_dir, n_ivf, index_ivf.nprobe),
|
"%s/trained_IVF%s_Flat_nprobe_%s.index"
|
||||||
|
% (model_log_dir, n_ivf, index_ivf.nprobe),
|
||||||
)
|
)
|
||||||
yield get_info_str("adding index")
|
yield get_info_str("adding index")
|
||||||
batch_size_add = 8192
|
batch_size_add = 8192
|
||||||
@ -921,7 +922,8 @@ def train1key(
|
|||||||
index.add(big_npy[i : i + batch_size_add])
|
index.add(big_npy[i : i + batch_size_add])
|
||||||
faiss.write_index(
|
faiss.write_index(
|
||||||
index,
|
index,
|
||||||
"%s/added_IVF%s_Flat_nprobe_%s.index" % (model_log_dir, n_ivf, index_ivf.nprobe),
|
"%s/added_IVF%s_Flat_nprobe_%s.index"
|
||||||
|
% (model_log_dir, n_ivf, index_ivf.nprobe),
|
||||||
)
|
)
|
||||||
yield get_info_str(
|
yield get_info_str(
|
||||||
"成功构建索引, added_IVF%s_Flat_nprobe_%s.index" % (n_ivf, index_ivf.nprobe)
|
"成功构建索引, added_IVF%s_Flat_nprobe_%s.index" % (n_ivf, index_ivf.nprobe)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user