You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to load an already trained word2vec model downloaded from here by using the following code, as suggested by the aforementioned website: from gensim.models import Word2Vec model=Word2Vec.load('wiki_iter=5_algorithm=skipgram_window=10_size=300_neg-samples=10.m')
When I try to execute that code, I get the following error: UserWarning: detected Windows; aliasing chunkize to chunkize_serial warnings.warn("detected Windows; aliasing chunkize to chunkize_serial") Traceback (most recent call last): File "d:\DavideV\documents\visual studio 2017\Projects\tesi\tesi\tesi.py", line 112, in <module> model=Word2Vec.load('wiki_iter=5_algorithm=skipgram_window=10_size=300_neg-samples=10.m') File "C:\Users\admin\Anaconda3\lib\site-packages\gensim\models\word2vec.py", line 979, in load return load_old_word2vec(*args, **kwargs) File "C:\Users\admin\Anaconda3\lib\site-packages\gensim\models\deprecated\word2vec.py", line 155, in load_old_word2vec 'size': old_model.vector_size, AttributeError: 'Word2Vec' object has no attribute 'vector_size'
I suppose that this is due to the fact that the model has probably been trained with a previous version of gensim, but I would prefer to avoid to retrain it.
Versions
Windows-10-10.0.16299-SP0
Python 3.6.3 |Anaconda, Inc.| (default, Oct 15 2017, 03:27:45) [MSC v.1900 64 bit (AMD64)]
gensim 3.4.0
The text was updated successfully, but these errors were encountered:
@dvaosta Thanks for the report. This is a known issue and is addressed in #2012. The PR addresses your issue so you can try using the code from the PR. It should solve your issue. The fix will be merged soon.
Description
I'm trying to load an already trained word2vec model downloaded from here by using the following code, as suggested by the aforementioned website:
from gensim.models import Word2Vec model=Word2Vec.load('wiki_iter=5_algorithm=skipgram_window=10_size=300_neg-samples=10.m')
When I try to execute that code, I get the following error:
UserWarning: detected Windows; aliasing chunkize to chunkize_serial warnings.warn("detected Windows; aliasing chunkize to chunkize_serial") Traceback (most recent call last): File "d:\DavideV\documents\visual studio 2017\Projects\tesi\tesi\tesi.py", line 112, in <module> model=Word2Vec.load('wiki_iter=5_algorithm=skipgram_window=10_size=300_neg-samples=10.m') File "C:\Users\admin\Anaconda3\lib\site-packages\gensim\models\word2vec.py", line 979, in load return load_old_word2vec(*args, **kwargs) File "C:\Users\admin\Anaconda3\lib\site-packages\gensim\models\deprecated\word2vec.py", line 155, in load_old_word2vec 'size': old_model.vector_size, AttributeError: 'Word2Vec' object has no attribute 'vector_size'
I suppose that this is due to the fact that the model has probably been trained with a previous version of gensim, but I would prefer to avoid to retrain it.
Versions
Windows-10-10.0.16299-SP0
Python 3.6.3 |Anaconda, Inc.| (default, Oct 15 2017, 03:27:45) [MSC v.1900 64 bit (AMD64)]
gensim 3.4.0
The text was updated successfully, but these errors were encountered: