WeSTClass icon indicating copy to clipboard operation
WeSTClass copied to clipboard

TypeError: argument of type 'Word2Vec' is not iterable

Open filzahamjad opened this issue 3 years ago • 3 comments

running command: python main.py --dataset yelp --sup_source docs --model cnn i'm getting this error: ### Input preparation ### Loading existing Word2Vec model ./yelp/embedding... Traceback (most recent call last): File "main.py", line 185, in embedding_weights = train_word2vec(x, vocabulary_inv, args.dataset) File "main.py", line 46, in train_word2vec for key, word in vocabulary_inv.items()} File "main.py", line 46, in for key, word in vocabulary_inv.items()} TypeError: argument of type 'Word2Vec' is not iterable

filzahamjad avatar Dec 12 '21 10:12 filzahamjad

Hello, I have met the same problem. Have you solve this problem?

zengjl20 avatar Mar 10 '22 09:03 zengjl20

@zengjl20 No. I went with conWea instead of this.

filzahamjad avatar Mar 10 '22 13:03 filzahamjad

I met the same problem. In my case, changing "embedding_model" to "embedding_model.wv" in line 46 of 'main.py' solved my problem.

ozyyshr avatar Oct 10 '22 03:10 ozyyshr