Skip to content

Beam Search finalize() bug: not update parents in the "body" #2

@AaronYALai

Description

@AaronYALai

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions