3 ms·
They use cosine because of performance reasons. Euclidean distance when used is squared, because even that sqrt is too expensive.
by Shorel 4y ago
They use cosine because of performance reasons.
Euclidean distance when used is squared, because even that sqrt is too expensive.
- iandanforth 4y agoAlso note that the embeddings are learned based on which distance metric is used, thus making it important to use the right distance metric with the right embeddings above and beyond wall-clock performance. Other metrics may still work, but less well.