Have 2 batches of vectors one matrix is 128 X 120 and the other is 100 X 120 how do I computer euclidean distance?
So I have 128 vectors of length 120 and another 100 vectors of length 120. I want to compute the Euclidean distance between the 128 with each of the 100 vectors in the other tensor. So my return result should be 128 X 100, as in the first 128 vector's euclidean distance for each of the 100 vectors in the other batch where tensor[0,0] corresponds to the Euclidean distance between vector 0 out of 128 and vector 0 out of 100 and tensor[0,-1] corresponds to the euclidean distance between vector 0 out of the 128 and the last vector out of the 100 in the other batch.
I'm sure there's a way to do this without a double for loop but I'm not sure how.