jhlau / doc2vec

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

Getting error TypeError: __init__() got an unexpected keyword argument 'pretrained_emb' #2

Closed shaktisd closed 7 years ago

shaktisd commented 7 years ago

When I am trying to run train_model.py , following error is coming . python train_model.py Traceback (most recent call last): File "train_model.py", line 30, in model = g.Doc2Vec(docs, size=vector_size, window=window_size, min_count=min_count, sample=sampling_threshold, workers=worker_count, hs=0, dm=dm, negative=negative_size, dbow_words=1, dm_concat=1, pretrained_emb=pretrained_emb, iter=train_epoch) File "/usr/local/lib/python2.7/dist-packages/gensim-0.13.2-py2.7-linux-x86_64.egg/gensim/models/doc2vec.py", line 607, in init null_word=dm_concat, **kwargs) TypeError: init() got an unexpected keyword argument 'pretrained_emb'

jhlau commented 7 years ago

You need to use my forked version of gensim: https://github.com/jhlau/doc2vec#requirements

learnercat commented 7 years ago

Thanks for your very quick response! Now fixed it!