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
In this code, in the "Get word embeddings" section of the "Skip-gram model", the code is as follows:
merge_layer = model.layers[0] word_model = merge_layer.layers[0] word_embed_layer = word_model.layers[0] weights = word_embed_layer.get_weights()[0][1:]
merge_layer = model.layers[0]
word_model = merge_layer.layers[0]
word_embed_layer = word_model.layers[0]
weights = word_embed_layer.get_weights()[0][1:]
The above code gives the error as
AttributeError: 'InputLayer' object has no attribute 'layers'
The following code should be inserted in place of the above code (it works perfectly):
word_embed_layer = model.layers[2] weights = word_embed_layer.get_weights()[0][1:]
word_embed_layer = model.layers[2]
The text was updated successfully, but these errors were encountered:
Thanks
Sorry, something went wrong.
No branches or pull requests
In this code, in the "Get word embeddings" section of the "Skip-gram model", the code is as follows:
merge_layer = model.layers[0]
word_model = merge_layer.layers[0]
word_embed_layer = word_model.layers[0]
weights = word_embed_layer.get_weights()[0][1:]
The above code gives the error as
The following code should be inserted in place of the above code (it works perfectly):
word_embed_layer = model.layers[2]
weights = word_embed_layer.get_weights()[0][1:]
The text was updated successfully, but these errors were encountered: