fix tutorial files
Summary: Added TARGETS files and fixed GPU tutorial code. Related to issue https://github.com/facebookresearch/faiss/issues/1408 Reviewed By: beauby Differential Revision: D23728732 fbshipit-source-id: 22bec7d439ffc187c144575e1e984111bfbfcbb2pull/1397/head^2
parent
d2d32af6c5
commit
15ffe976f0
|
@ -79,7 +79,7 @@ int main() {
|
|||
// Using an IVF index
|
||||
|
||||
int nlist = 100;
|
||||
faiss::gpu::GpuIndexIVFFlat index_ivf(&res, d, nlist);
|
||||
faiss::gpu::GpuIndexIVFFlat index_ivf(&res, d, nlist, faiss::METRIC_L2);
|
||||
|
||||
assert(!index_ivf.is_trained);
|
||||
index_ivf.train(nb, xb);
|
||||
|
|
|
@ -44,7 +44,7 @@ int main() {
|
|||
|
||||
printf("Number of GPUs: %d\n", ngpus);
|
||||
|
||||
std::vector<faiss::gpu::GpuResources*> res;
|
||||
std::vector<faiss::gpu::GpuResourcesProvider*> res;
|
||||
std::vector<int> devs;
|
||||
for(int i = 0; i < ngpus; i++) {
|
||||
res.push_back(new faiss::gpu::StandardGpuResources);
|
||||
|
|
Loading…
Reference in New Issue