(no title)
persedes | 9 months ago
emb = SentenceTransformer("all-MiniLM-L6-v2")
embeddings = emb.encode(["dog", "god"])
cosine_similarity(embeddings)
Out[16]:
array([[1. , 0.41313702],
[0.41313702, 1.0000004 ]], dtype=float32)
No comments yet.