标签:情况 not div 错误 end nbsp ror lse highlight
训练Doc2Vec模型之后,想要索取文档向量,却出现意外报错:
for idx, docvec in enumerate(model.docvecs): if idx < 17600: x_train.append(docvec) else: x_test.append(docvec)
错误情况:
KeyError: "tag ‘23943‘ not seen in training corpus/invalid"
解决方法:
① model.docvecs.doctag_syn0 (即将弃用) Or ② model.docvecs.vectors_docs
Doc2Vec -- "tag '23943' not seen in training corpus/invalid" 错误
标签:情况 not div 错误 end nbsp ror lse highlight
原文地址:https://www.cnblogs.com/harp-yestar/p/Doc2vec_Error.html