Closed iriscxy closed 6 years ago
prev_hyp_ids
is the list of indices for the hypotheses in the beam from which a new candidate word comes. For example, prev_hyp_ids [0]
is the index of the hypothesis in the beam that generates word_ids[0]
.
why prev_hyp_ids
is quotient of top_new_hyp_pos / tgt_vocab_size?
''' prev_hyp_ids = top_new_hyp_pos / tgt_vocab_size word_ids = top_new_hyp_pos % tgt_vocab_size ''' to be specific. what is prev_hyp_ids and what does it use for?