Hi,
I can't find anything related to my issue, so I'm posting it here. I trained a doc2vec model, then saved it using model.save("my.model"). It saved 4 files:
I then try to load it, using d2v = gensim.models.Doc2Vec.load('my.model'), and it returns:
Traceback (most recent call last):
File "lstm.py", line 41, in <module>
d2v = gensim.models.Doc2Vec.load('my.model')
File "/home/fiorinin/deeplearning/lib/python3.4/site-packages/gensim/models/word2vec.py", line 1412, in load
model = super(Word2Vec, cls).load(*args, **kwargs)
File "/home/fiorinin/deeplearning/lib/python3.4/site-packages/gensim/utils.py", line 276, in load
obj = unpickle(fname)
File "/home/fiorinin/deeplearning/lib/python3.4/site-packages/gensim/utils.py", line 938, in unpickle
return _pickle.load(f, encoding='latin1')
AttributeError: Can't get attribute 'EuclideanKeyedVectors' on <module 'gensim.models.keyedvectors' from '/home/fiorinin/deeplearning/lib/python3.4/site-packages/gensim/models/keyedvectors.py'>
Any idea? Is it normal that it uses word2vec anyway - I assume this is a parent class?
I tried updating, just in case, but there's the same error. Also, note that the training was done on a different machine, accessing the same directory. Can it be an incompatibility maybe, and if so, how to solve it?
Thanks!
Forget it, looks like my issue is I can't upgrade gensim properly on the machine trying to load the model. That was a compatibility issue, the training machine using 3.2.0 and the loading machine using 2.3.0. It looked like it upgraded gensim, but it didn't. The training machine can load the model without issue, so I'm closing this. Sorry to bother.
Most helpful comment
Forget it, looks like my issue is I can't upgrade gensim properly on the machine trying to load the model. That was a compatibility issue, the training machine using 3.2.0 and the loading machine using 2.3.0. It looked like it upgraded gensim, but it didn't. The training machine can load the model without issue, so I'm closing this. Sorry to bother.