Skip to content

Instantly share code, notes, and snippets.

@sushantjha8
Created March 16, 2020 06:24
Show Gist options
  • Save sushantjha8/8b961ffb49cb7bec2e7ced727af74e02 to your computer and use it in GitHub Desktop.
Save sushantjha8/8b961ffb49cb7bec2e7ced727af74e02 to your computer and use it in GitHub Desktop.
{
"embeddings": [
{
"tensorName": "My tensor",
"tensorShape": [
1000,
50
],
"tensorPath": "https://raw.githubusercontent.com/.../tensors.tsv",
"metadataPath": "https://raw.githubusercontent.com/.../optional.metadata.tsv"
}
]
}
weights = embedding_layer.get_weights()[0]
print(weights)
import numpy as np
np.savetxt('weight.tsv' , weights , fmt='%s', delimiter='\t ')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment