You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
model = SentenceTransformer('LaBSE')
zh_vec = model.encode('可以给你认识的人打个电话。')
vecs = model.encode(['contacts who may know about a job?', '可以给你认识的人打个电话。'])
print(zh_vec.mean(), vecs1[1].mean())
got:
-0.011027637 -0.011027641
The text was updated successfully, but these errors were encountered:
Although, on second thought, when you instantiate a model this way, you're using it in training mode. It might be because of the way dropout behaves in training mode. Try adding model.eval() before calculating the embeddings.
@ir2718 is right, those other issues contain a bit more information. In short: there are slight differences, but significantly small that the embeddings are not notably affected.
As for the second possible explanation: model.encode moves the model to eval() mode automatically, so that shouldn't be the cause.
got:
-0.011027637 -0.011027641
The text was updated successfully, but these errors were encountered: