Reputation: 115
I'm loading pretrained Doc2Vec model using:
from gensim.models import Doc2Vec
model = Doc2Vec.load('/path/to/pretrained/model')
I'm getting the following error:
AttributeError: 'module' object has no attribute 'call_on_class_only'
Does anyone know how to fix it. The model was trained with gensim 0.13.3 and I'm using gensim 0.12.4.
Upvotes: 0
Views: 791
Reputation: 54153
Gensim will generally try to support loading of models saved from older versions into newer versions – but the reverse is a much harder problem, and will only work sometimes.
So upgrade the environment where you want to load the model to 0.13.3, to match where it was trained. (Or try the most-recent version, 1.0.1.) But don't try to move models backwards.
Upvotes: 2