Fixed error: AttributeError: ‘Word2Vec’ object has no attribute ‘size’

For old gensim models, you may get this error:

AttributeError: 'Word2Vec' object has no attribute 'size'

You need to set the vector length:

model.vector_size = 1000


Need help with Solr or Elastic Search? Contact me for Solr consulting.

Leave a Reply

Your email address will not be published. Required fields are marked *