Skip to content
Unverified Commit 4ee1ec6e authored by Tsz Kin Lam's avatar Tsz Kin Lam Committed by GitHub
Browse files

Update search.py

Fix the issue of "translation result is dependent on batch size except for beam size of 1" in the previous implementation of beam search. The re-ordering of indices, outputs, masks, hidden states and attention vector should be done at each time step regardless of the conditional: if is_finished.any():
parent 9a379f2c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment