Skip to content

Commit

Permalink
Fixed typo
Browse files Browse the repository at this point in the history
Fixed a type in `cos_sim_2d(x, y)`
  • Loading branch information
martindevans authored and csris committed Mar 20, 2023
1 parent cd0f1c9 commit 78f970f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion retrieval/wikipedia.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def mean_pooling(token_embeddings, mask):

def cos_sim_2d(x, y):
norm_x = x / np.linalg.norm(x, axis=1, keepdims=True)
norm_y = y / np.linalg.norm(x, axis=1, keepdims=True)
norm_y = y / np.linalg.norm(y, axis=1, keepdims=True)
return np.matmul(norm_x, norm_y.T)


Expand Down

0 comments on commit 78f970f

Please sign in to comment.