faiss/tests
Alexandr Guzhva 1e4586a5a0 IndexRowwiseMinMax (#2439)
Summary:
Pull Request resolved: https://github.com/facebookresearch/faiss/pull/2439

Index wrapper that performs rowwise normalization to [0,1], preserving the coefficients. This is a vector codec index only.

Basically, this index performs a rowwise scaling to [0,1] of every row in an input dataset before calling subindex::train() and subindex::sa_encode(). sa_encode() call stores the scaling coefficients (scaler and minv) in the very beginning of every output code. The format:
    [scaler][minv][subindex::sa_encode() output]
The de-scaling in sa_decode() is done using:
    output_rescaled = scaler * output + minv

An additional ::train_inplace() function is provided in order to do an inplace scaling before calling subindex::train() and, thus, avoiding the cloning of the input dataset, but modifying the input dataset because of the scaling and the scaling back.

Derived classes provide different data types for scaling coefficients. Currently, versions with fp16 and fp32 scaling coefficients are available.
* fp16 version adds 4 extra bytes per encoded vector
* fp32 version adds 8 extra bytes per encoded vector

Reviewed By: mdouze

Differential Revision: D38581012

fbshipit-source-id: d739878f1db62ac5ab9e0db3f84aeb2b70a1b6c0
2022-09-05 06:59:41 -07:00
..
CMakeLists.txt Fix test_cppcontrib_sa_decode.cpp (#2388) 2022-07-20 23:46:31 -07:00
common_faiss_tests.py Add manifold check for size 0 (#1867) 2021-05-09 22:30:31 -07:00
test_autotune.py
test_binary_factory.py
test_binary_flat.cpp
test_binary_hashindex.py Add manifold check for size 0 (#1867) 2021-05-09 22:30:31 -07:00
test_binary_io.py
test_build_blocks.py add batch reconstruction function (#2379) 2022-07-18 08:26:06 -07:00
test_clustering.py Non-uniform quantization of vector norms (#2037) 2021-10-11 14:13:16 -07:00
test_contrib.py fix test in test_contrib (#2294) 2022-04-20 03:03:38 -07:00
test_contrib_with_scipy.py contrib clustering module (#2217) 2022-02-28 14:18:47 -08:00
test_cppcontrib_sa_decode.cpp Remove some redundant tests (#2396) 2022-07-26 06:03:31 -07:00
test_dealloc_invlists.cpp
test_documentation.py Generate python docstrings from doxygen comments. (#1969) 2021-10-10 22:14:48 -07:00
test_doxygen_documentation.py Generate python docstrings from doxygen comments. (#1969) 2021-10-10 22:14:48 -07:00
test_extra_distances.py Add manifold check for size 0 (#1867) 2021-05-09 22:30:31 -07:00
test_factory.py fbcode//faiss/tests 2022-04-25 17:55:46 -07:00
test_fast_scan.py Implement search methods for ProductAdditiveQuantizer (#2336) 2022-07-27 05:32:15 -07:00
test_fast_scan_ivf.py Support for parallelization in IVFFastScan over both queries and probes (#2380) 2022-08-31 05:37:53 -07:00
test_index.py Add IndexNSGPQ and IndexNSGSQ (#2218) 2022-02-18 04:51:15 -08:00
test_index_accuracy.py Break distance ties in `heap_replace_top()` by ID (#2245) 2022-03-09 10:23:48 -08:00
test_index_binary.py Fix packaging (#2121) 2021-12-07 13:12:30 -08:00
test_index_binary_from_float.py
test_index_composite.py IndexFlatCodes: a single parent for all flat codecs (#2132) 2021-12-07 01:31:07 -08:00
test_io.py IndexFlatCodes: a single parent for all flat codecs (#2132) 2021-12-07 01:31:07 -08:00
test_ivflib.py
test_ivfpq_codec.cpp
test_ivfpq_indexing.cpp
test_local_search_quantizer.py Implement search methods for ProductAdditiveQuantizer (#2336) 2022-07-27 05:32:15 -07:00
test_lowlevel_ivf.cpp IVFPQ AVX2 optimization for PQ, including polysemous filtering (#2277) 2022-03-24 06:35:38 -07:00
test_mem_leak.cpp Reduce mem usage + improve performance for sequential search imlementation 2021-10-05 15:54:04 -07:00
test_merge.cpp add batch reconstruction function (#2379) 2022-07-18 08:26:06 -07:00
test_meta_index.py Fix packaging (#2121) 2021-12-07 13:12:30 -08:00
test_omp_threads.cpp
test_omp_threads_py.py
test_ondisk_ivf.cpp add batch reconstruction function (#2379) 2022-07-18 08:26:06 -07:00
test_oom_exception.py
test_pairs_decoding.cpp
test_params_override.cpp
test_partition.py
test_pq_encoding.cpp
test_product_quantizer.py
test_referenced_objects.py
test_refine.py Generalize DistanceComputer for flat indexes (#2255) 2022-03-20 23:43:33 -07:00
test_residual_quantizer.py Implement search methods for ProductAdditiveQuantizer (#2336) 2022-07-27 05:32:15 -07:00
test_rowwise_minmax.py IndexRowwiseMinMax (#2439) 2022-09-05 06:59:41 -07:00
test_sliding_ivf.cpp
test_standalone_codec.py Add sa_decode() to IndexIVFAdditiveQuantizer (#2362) 2022-06-20 10:54:11 -07:00
test_threaded_index.cpp
test_transfer_invlists.cpp
torch_test_contrib.py Automatic type conversions for Python API (#2274) 2022-03-30 05:42:08 -07:00