| 
           return (time + 1), outputs_ta, parents  | 
        
    
   
 
The "body" function for the tf.while_loop extracts final decoding results time step by time step.
But the state "parents" has not been updated in the body function!
def body(time, outputs_ta, parents): 
    ... (no update of parents) ...
    return (time + 1), outputs_ta, parents
 
This should be as the following:
return (time + 1), outputs_ta, input_t.parents
 
since parents for the next step are stored in "input_t" which is extracted for the current time step.