Open pavellevap opened 4 years ago
Yes, that's incorrect, thanks! The supporting KeyedVectors
classes & handling of the cached normalized vectors (as handled by init_sims
/clear_sims
) is getting a big rework in #2698 (that may eliminate this method entirely)... I'll make sure this particular bug doesn't survive that work.
I was reading Doc2Vec source code and noticed a probable bug in clear_sims method. https://github.com/RaRe-Technologies/gensim/blob/8d79794118a3adeda8cf9c873eb205cecf47cfef/gensim/models/doc2vec.py#L387
It sets vectors_docs_norm attribute of Word2VecKeyedVectors to None. However, Word2VecKeyedVectors does not have this attribute. So I think this line should be
self.docvecs.vectors_docs_norm = None