How exactly does gather_tree
in contrib.seq2seq
work? I can see that it takes the predicted ids and beam parent ids and somehow returns the final beams, but what's actually going underneath the hood? There doesn't seem to be any Python code base I could examine to figure it out. The API isn't very explanatory;
Is there any code source for tf.contrib.seq2seq.gather_tree
? I am using TensorFlow 1.3 and looking inside gen_beam_search_ops.py
doesn't seem helpful.
The codes are detailed as follows:
github: seq2seq beam_search