spanish_word2vec icon indicating copy to clipboard operation
spanish_word2vec copied to clipboard

Loading the model does not work

Open juansgomez87 opened this issue 5 years ago • 2 comments

I'm getting errors when trying to load the model. Do you have any suggestions?

model = Word2Vec.load('./models/complete.model')

Traceback (most recent call last): File "", line 1, in File "/home/user/.local/lib/python3.8/site-packages/gensim/models/word2vec.py", line 1934, in load raise ae File "/home/user/.local/lib/python3.8/site-packages/gensim/models/word2vec.py", line 1922, in load model = super(Word2Vec, cls).load(*args, **kwargs) File "/home/user/.local/lib/python3.8/site-packages/gensim/utils.py", line 486, in load obj = unpickle(fname) File "/home/user/.local/lib/python3.8/site-packages/gensim/utils.py", line 1458, in unpickle return _pickle.load(f, encoding='latin1') # needed because loading from S3 doesn't support readline() AttributeError: Can't get attribute 'Vocab' on <module 'gensim.models.word2vec' from '/home/user/.local/lib/python3.8/site-packages/gensim/models/word2vec.py'>

Update: The model appears not to fail loading when using gensim=3.8.1. However, python crashes when loading. I assume memory issues (?)

juansgomez87 avatar May 06 '21 16:05 juansgomez87

pip install gensim==3.8.1 It worked for me

SebastianCB-dev avatar Oct 25 '22 13:10 SebastianCB-dev