I have an assert that fails, namely assert(ci >= 0 && ci < k + k_frozen); in compute_centroids() in Clustering.cpp. If I debug, I see that ci is indeed -1 for all i in the array assign. As far as I gather, this means that datapoints/training vectors have undefined centroids? I am not very good at reading code and walking it back further is rather cumbersome for me, so I was wondering if anyone can tell me a likely cause.
I have used Faiss with other datasets (EMNIST, self-generated datasets, etc.) without issues, but this assertion fails when I try it on hyperspectral images (using only labeled texels as datapoints).
Faiss version: 1.7.1 (I use vcpkg and I don't know which commit it uses, but it's the one associated with this commit of vcpkg.)
Installed from: vcpkg, compiled with Visual Studio Community 2022 compiler
Faiss compilation options: I simply use vcpkg's manifest mode like this:
The problem happens for the currently hardcoded indian_pines_10249n_220d.txt file as well as paviaU_42776n_103d.txt. Please change the hardcoded n and d variables (with values from the filename) when trying another dataset. Other datasets that I encoded in a similar manner work fine.
Summary
I have an assert that fails, namely
assert(ci >= 0 && ci < k + k_frozen);
incompute_centroids()
inClustering.cpp
. If I debug, I see thatci
is indeed-1
for alli
in the arrayassign
. As far as I gather, this means that datapoints/training vectors have undefined centroids? I am not very good at reading code and walking it back further is rather cumbersome for me, so I was wondering if anyone can tell me a likely cause.I have used Faiss with other datasets (EMNIST, self-generated datasets, etc.) without issues, but this assertion fails when I try it on hyperspectral images (using only labeled texels as datapoints).
Faiss version: 1.7.1 (I use vcpkg and I don't know which commit it uses, but it's the one associated with this commit of vcpkg.)
Installed from: vcpkg, compiled with Visual Studio Community 2022 compiler
Faiss compilation options: I simply use vcpkg's manifest mode like this:
Running on:
Interface:
Reproduction instructions
The problem happens for the currently hardcoded
indian_pines_10249n_220d.txt
file as well aspaviaU_42776n_103d.txt
. Please change the hardcodedn
andd
variables (with values from the filename) when trying another dataset. Other datasets that I encoded in a similar manner work fine.