Skip to content

Instantly share code, notes, and snippets.

@sushantjha8
Created March 16, 2020 06:24
Show Gist options
  • Select an option

  • Save sushantjha8/8b961ffb49cb7bec2e7ced727af74e02 to your computer and use it in GitHub Desktop.

Select an option

Save sushantjha8/8b961ffb49cb7bec2e7ced727af74e02 to your computer and use it in GitHub Desktop.

Revisions

  1. sushantjha8 created this gist Mar 16, 2020.
    13 changes: 13 additions & 0 deletions embeding-test.json
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,13 @@
    {
    "embeddings": [
    {
    "tensorName": "My tensor",
    "tensorShape": [
    1000,
    50
    ],
    "tensorPath": "https://raw.githubusercontent.com/.../tensors.tsv",
    "metadataPath": "https://raw.githubusercontent.com/.../optional.metadata.tsv"
    }
    ]
    }
    4 changes: 4 additions & 0 deletions test.py
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,4 @@
    weights = embedding_layer.get_weights()[0]
    print(weights)
    import numpy as np
    np.savetxt('weight.tsv' , weights , fmt='%s', delimiter='\t ')