jhlau / doc2vec

Python scripts for training/testing paragraph vectors
Apache License 2.0
640 stars 191 forks source link

Doc2vec Attribute error while loading #19

Closed Senhaji-Rhazi-Hamza closed 6 years ago

Senhaji-Rhazi-Hamza commented 6 years ago

1st thanks for shairing your pretrained vector.

i downloaded the pre-trained doc2vec

i run this peice of code

from gensim.models.doc2vec import Doc2Vec, TaggedDocument
model = Doc2Vec.load("doc2vec.bin ")

i get this error AttributeError: 'Doc2Vec' object has no attribute 'batch_words'

while doc2vec.bin doc2vec.bin.syn0.npy doc2vec.bin.syn1neg.npy are in the same folder at the root

jhlau commented 6 years ago

Are you using my forked gensim code: https://github.com/jhlau/gensim

Senhaji-Rhazi-Hamza commented 6 years ago

Hi, I did not, i used this one https://github.com/RaRe-Technologies/gensim should i use yours ?, is there a way to use the one i am using ( https://github.com/RaRe-Technologies/gensim )? thank you !!

jhlau commented 6 years ago

You have to use the forked version, because it's modified to take in pre-trained embeddings.

Senhaji-Rhazi-Hamza commented 6 years ago

Thank you !!