We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
KeyedVectors.get_embedding_layer does not set trainable when returning the Keras Embedding layer.
KeyedVectors.get_embedding_layer
trainable
from gensim.models.keyedvectors import KeyedVectors embeddings = KeyedVectors.load_word2vec_format("GoogleNews-vectors-negative300.bin", binary = True) embedding_layer = embeddings.get_embedding_layer(train_embeddings=False) print(embedding_layer.trainable)
False
True
Linux-4.4.0-93-generic-x86_64-with-debian-stretch-sid Python 3.6.1 |Continuum Analytics, Inc.| (default, May 11 2017, 13:09:58) [GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] NumPy 1.13.1 SciPy 0.19.1 gensim 2.3.0 FAST_VERSION 2
The text was updated successfully, but these errors were encountered:
keyedvectors.py : 835
layer = Embedding(input_dim=weights.shape[0], output_dim=weights.shape[1], weights=[weights])
get_embedding_layer function is not use train_embeddings parameter
get_embedding_layer
train_embeddings
Sorry, something went wrong.
Fixed in #1558
No branches or pull requests
Description
KeyedVectors.get_embedding_layer
does not settrainable
when returning the Keras Embedding layer.Steps/Code/Corpus to Reproduce
Expected Results
False
Actual Results
True
Versions
Linux-4.4.0-93-generic-x86_64-with-debian-stretch-sid
Python 3.6.1 |Continuum Analytics, Inc.| (default, May 11 2017, 13:09:58)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)]
NumPy 1.13.1
SciPy 0.19.1
gensim 2.3.0
FAST_VERSION 2
The text was updated successfully, but these errors were encountered: