Similarities for any pair of N embeddings should be of shape (N, N) ? Where does the last “D” come from?
Btw, I have read that if you have embeddings A, B and normalized it in such a way that the norm of each embedding equals to 1. matmul(A, B.t()) should be the cosine similarity for each pair of the embeddings?