当我从 pkl 文件加载 doc2vec 模型时,出现此错误。
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-45-5ed9dc71f3a6> in <module>()
----> 1 temp_docky.infer_vector(['paypal'])
C:\Users\Laxmikant\Anaconda\lib\site-packages\gensim\models\doc2vec.pyc in infer_vector(self, doc_words, alpha, min_alpha, steps)
750 train_document_dm(self, doc_words, doctag_indexes, alpha, work, neu1,
751 learn_words=False, learn_hidden=False,
--> 752 doctag_vectors=doctag_vectors, doctag_locks=doctag_locks)
753 alpha = ((alpha - min_alpha) / (steps - i)) + min_alpha
754
C:\Users\Laxmikant\Anaconda\lib\site-packages\gensim\models\doc2vec_inner.pyx in gensim.models.doc2vec_inner.train_document_dm (./gensim/models/doc2vec_inner.c:5165)()
406 # default vectors, locks from syn0/doctag_syn0
407 if word_vectors is None:
--> 408 word_vectors = model.wv.syn0
409 _word_vectors = <REAL_t *>(np.PyArray_DATA(word_vectors))
410 if doctag_vectors is None:
AttributeError: 'Doc2Vec' object has no attribute 'wv'
你能帮忙解决错误吗?