DeMoriarty / fast_pytorch_kmeans

This is a pytorch implementation of k-means clustering algorithm
MIT License
284 stars 38 forks source link

Using torch normalize for cosine similarity normalization #15

Closed ancestor-mithril closed 1 year ago

ancestor-mithril commented 1 year ago

This version is more clear and torch.nn.functional.normalize is faster in micro-benchmarks than the current handwritten implementation.