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.