A GPU-compatible PyTorch implementation of K-means, designed for efficient quantization of representations from large self-supervised models.
First of all, install Python 3.8 or later.
Clone or download and extract the repository, navigate to <path-to-repository>
, open a
terminal and run:
pip install -r requirements
To run the example script, navigate to <path-to-repository>
, open a terminal and run
python kmeans.py