我需要一些关于如何通过c++接口删除ids的c++示例!谢谢!
faiss::IndexFlatL2 index(d);
printf("is_trained = %s\n", index.is_trained ? "true" : "false");
index.add(nb, xb);
faiss::IDSelectorRange ids(0,5);
long nremove = 0;
index.remove_ids(ids, nremove);发布于 2019-02-27 20:12:34
remove_ids接受一个IDSelector对象。IDSelectorRange删除两个ids之间的所有元素。
要删除ids列表,请使用带有要删除的ids表的IDSelectorBatch。
有关文档,请参阅https://github.com/facebookresearch/faiss/blob/master/AuxIndexStructures.h#L78。
https://stackoverflow.com/questions/54897561
复制相似问题