Skip to content

Commit

Permalink
Merge pull request #749 from ufal/fix-embeddings
Browse files Browse the repository at this point in the history
Fix embedding metadata path
  • Loading branch information
jlibovicky authored Aug 24, 2018
2 parents 4e9e994 + dd8e4fa commit 5acfb1d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions neuralmonkey/model/sequence.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,13 +148,14 @@ def tb_embedding_visualization(self, logdir: str,
# the overriding is turned to true, because if the model would not
# be allowed to override the output folder it would failed earlier.
# TODO when vocabularies will have name parameter, change it
wordlist = os.path.join(logdir, self.name + "_" + str(i) + ".tsv")
self.vocabularies[i].save_wordlist(wordlist, True, True)
metadata_path = self.name + "_" + str(i) + ".tsv"
self.vocabularies[i].save_wordlist(
os.path.join(logdir, metadata_path), True, True)

embedding = prj.embeddings.add()
# pylint: disable=unsubscriptable-object
embedding.tensor_name = self.embedding_matrices[i].name
embedding.metadata_path = wordlist
embedding.metadata_path = metadata_path

@tensor
def embedding_matrices(self) -> List[tf.Tensor]:
Expand Down

0 comments on commit 5acfb1d

Please sign in to comment.