Suggestion: add normalization option in the
avidale opened this issue · comments
David Dale commented
We can provide an optional argument normalize_embeddings
(like in sentence_transformers) to SentenceEncoder.encode_sentences
and also its wrapper LaserEncoderPipeline.encode_sentences
, which is False
by default. If it is True
, we L2-normalize the embeddings before returning them.
This would be convenient, because in most cases, we want normalized embeddings because they will be used for computing cosine similarity.