Skip to content

Simple function that computes pairwaise cosine distance between several vectors at once, pytorch can only compute beween two vectors at a time, which is time consuming and inneficient when you have multiple vectors.

Notifications You must be signed in to change notification settings

dalisson/pairwise_cosine_distance_pytorch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

Pytorch Pairwise cosine similarity
Computes the cosine similarity between all vectors in the input, pytorch originally only computes this between two vectors at a time which can be time consuming when dealing with thousands of vectors, something that is the case for embedding learning tasks.

About

Simple function that computes pairwaise cosine distance between several vectors at once, pytorch can only compute beween two vectors at a time, which is time consuming and inneficient when you have multiple vectors.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages