News for hackers. Stuff that matters.
Re:Show HN: Fashion Shopping with Nearest Neighbors by fredophile on Saturday March 15, 2025 @10:58PM (#43376657)
Out of curiosity, what's the size of vectors you're using (# of dimensions) and what distance metric are you using? Euclidean?
Re:Show HN: Fashion Shopping with Nearest Neighbors by unixpickle on Saturday March 15, 2025 @11:52PM (#43376847)
To optimize for fast nearest neighbors, I chose 256 dims. Notably, this actually hurt some of the pre-training classification losses pretty severely compared to 2k dims, so it definitely has a quality cost.

The site uses cosine distance. The code itself implements Euclidean distance, but I decided to normalize the vectors last minute out of FUD that some unusually small vectors would appear as neighbors for an abnormal number of examples.