AttributeError: 'KeyedVectors' object has no attribute 'get_keras_embedding'

Viewed 553

I want to import "Word2Vec" from "Keyed Vectors". This is my code:

from gensim.models import KeyedVectors

wv = KeyedVectors.load_word2vec_format("german.model", binary = True)

from keras.models import Sequential

model = Sequential()
model.add(wv.get_keras_embedding())

However, I get the following error message:

AttributeError: 'KeyedVectors' object has no attribute 'get_keras_embedding'

I would be really happy if someone could help me

1 Answers
Related