Closed Timothy199707 closed 3 years ago
I tried to run yelp and it take hours to finish bleu eval. I did some changes in the data_util file, but I'm not sure if it's related
Line 405 of src/main.py was done deliberately since this repo doesn't have an efficient batched version of beam search when beam > 1 -- if you do beam > 1, then the model just translates the batch one by one and is very slow as you observed. In our experiments we always used beam=1
Oh, I see, thanks for replying
in line 405 of src/main.py:
dev_batch_size = hparams.valid_batch_size if hparams.beam_size == 1 else 1
causes the evaluation part done with a batch size of 1 everytime beam > 1, and causes the calculation time to be excessively long. Is there a reason for the beam size needed to be 1 (e.g, gpu memory I assume), or can I just change it to dev_batch_size = hparams.valid_batch_size instead?