-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix error when cls_pooling="mean" or cls_pooling="max" for TransformerDocumentEmbeddings #3558
Fix error when cls_pooling="mean" or cls_pooling="max" for TransformerDocumentEmbeddings #3558
Conversation
I thought that the two failing tests ( When running tests locally, every test passes. Then I ran the Looking at the output, the problem was in comparing the floating point values (tensors) with I changed this Did you encounter similar problems before? |
Thank you for the bugfix @fkdosilovic |
"cls"
pooling option into a function.result
fromdocument_mean_pooling
anddocument_max_pooling
functions.test_default_embeddings_stay_the_same_after_saving_and_loading
andtest_embeddings_stay_the_same_after_saving_and_loading
inBaseEmbeddingsTest
to usetorch.allclose
Fixes #3552.