'Writes tensor to output_path as tsv.'

def _write_tensor(self, vocab_path, output_path, session, embedding):

    embeddings = session.run(embedding)
    with open(output_path, 'w') as out_f:
        with open(vocab_path) as vocab_f:
            for (index, word) in enumerate(vocab_f):
                word = word.strip()
                embedding = embeddings[index]
                print(' DCTB '.join(([word.strip()] + [str(x) for x in embedding])), file=out_f)
