Skip to content
This repository has been archived by the owner on Jan 24, 2024. It is now read-only.

Commit

Permalink
better output
Browse files Browse the repository at this point in the history
  • Loading branch information
daming-lu committed Jun 7, 2018
1 parent 7fbabdd commit 48f2646
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions 04.word2vec/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,9 @@ def infer(use_cuda, inference_program, params_dirname=None):
return_numpy=False)

print(numpy.array(result[0]))
most_possible_word_index = numpy.argmax(result[0])
print(most_possible_word_index)
print([key for key, value in word_dict.iteritems() if value == most_possible_word_index][0])


def main(use_cuda, is_sparse):
Expand Down

0 comments on commit 48f2646

Please sign in to comment.