Skip to content

Instantly share code, notes, and snippets.

@dipanjanS
Created March 13, 2018 19:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dipanjanS/e21c2fe26a54c3bbf90fe751989a7560 to your computer and use it in GitHub Desktop.
Save dipanjanS/e21c2fe26a54c3bbf90fe751989a7560 to your computer and use it in GitHub Desktop.
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:]
print(weights.shape)
pd.DataFrame(weights, index=id2word.values()).head()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment