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
A caller supplying use_norm expects (per doc-comment) a unit-normed vector back. But summing a bunch of individually unit-normed ngram vectors won't achieve that: you'd need to unit-norm the final result. And it's unlikely you'd want to use unit-normed summands: the original raw ngram vectors are what the algorithm has trained to model words-from-fragments.
Of course, matching the FB reference implementation's behavior should be a top goal, but I doubt it offers any such summing-of-normed-ngram-vectors.
If this current behavior is replaced with the more sensible "add raw vecs, unit-normalize final result", then there's no need to ever calculate/store the vectors_ngrams_norm array.
The text was updated successfully, but these errors were encountered:
The logic in https://github.com/RaRe-Technologies/gensim/blob/ee6169100d13d7f684b96ac137065e302aeb7b1e/gensim/models/keyedvectors.py#L2090 regarding the summing of normed ngram-vectors, looks like nonsense to me.
A caller supplying
use_norm
expects (per doc-comment) a unit-normed vector back. But summing a bunch of individually unit-normed ngram vectors won't achieve that: you'd need to unit-norm the final result. And it's unlikely you'd want to use unit-normed summands: the original raw ngram vectors are what the algorithm has trained to model words-from-fragments.Of course, matching the FB reference implementation's behavior should be a top goal, but I doubt it offers any such summing-of-normed-ngram-vectors.
If this current behavior is replaced with the more sensible "add raw vecs, unit-normalize final result", then there's no need to ever calculate/store the
vectors_ngrams_norm
array.The text was updated successfully, but these errors were encountered: