nmt
nmt copied to clipboard
How to choose the least likely word as the output?
Generally, we choose the most likely word, the id associated with the maximum logit value, as the emitted word (this is the "greedy" behavior). But in some cases, I want to choose the least likely word as the output, how should I modify the code?
@lzt2015 I think you can implement a Helper class using the GreedyEmbeddingHelper as a reference. Just replace argmax with argmin should be sufficient.
@oahziur thank you for your attention and reply!
@lzt2015 Hi, I have the similar question with you. I want to choose the second likely word. How do you deal with that? Thanks!