Skip to content

Stop prediction when EOS is reached #5

Description

@surenreddy

Hi Dongjun,
In line 38, of the Graph class, the following loop continues until max sequence length is decoded.
for i in range(2, Config.data.max_seq_length):

Is it possible to break the loop when EOS(end of the sequence) is reached for the batch?

Thank you,
Surendra

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