Note that during both training and testing time, the decoder stops beam search when it satisfies the optimal stopping criteria .
we do not need to penalize the overlength translations since we have already promoted the gold reference to the top of the beam at time step |y| during training.